기본 콘텐츠로 건너뛰기

FreeBSD에서 shm_open은 open일 뿐이다.

Linux에서 잘 써먹고 있는 파일처럼 쓸 수 있는 shared memory interface인 shm_open. 이게 표준안(POSIX.1)에 있길래 아무런 의심 없이 잘 썼지. 그런데 아쉽게도 FreeBSD에서 이 녀석은 단순히 open을 wrapping한 것일뿐. 즉, 그냥 일반 파일을 조작하는 것에 불과하다는 것이지. 현재 FreeBSD 6.2가 나왔지만 FreeBSD에서 제공하는 man page에는 아직도 래핑함수라는 걸 명시하고 있네.
In the FreeBSD implementation, POSIX shared memory objects are implemented as ordinary files.  The shm_open() and shm_unlink() act as wrappers around the open(2) and unlink(2) routines, and path, flags, and mode arguments are as specified for those functions.  The flags argument is checked to ensure that the access mode specified is not O_WRONLY (which is not defined for shared memory objects).
에구구... 안타까워라. 실제로도 FreeBSD에서 shm_open하면 실행한 디렉토리에 바로 파일이 만들어지네...

Powered by ScribeFire.

댓글

이 블로그의 인기 게시물

설치한 패키지에서 RPM 추출하기

오래된 패키지를 관리할 저장소가 없어졌고, 기존 패키지로 다른 서버를 세팅해야할 일이 생겼다면 RPM의 리패키지 기능을 이용해보자. $ rpm -e --repackage [PACKAGE_NAME] 위와 같이 리패키지하면, /var/spool/repackage/ 에 생성한 RPM파일이 있다. :-)

Winget 해시 무시하기

가끔씩 Winget 에서 패키지를 다운로드 했을 때, "설치 관리자 해시가 일치하지 않습니다." 오류가 뜰 때가 있다. 보안 이슈가 있지만, 그냥 무시하고 싶을 때, 아래 순서로 무시해준다. 관리자 권한 winget settings --enable InstallerHashOverride 설치 winget install --ignore-security-hash --id NirSoft.NirCmd