On 8/25/06, Tom Lane <[EMAIL PROTECTED]> wrote:
> When I set HISTFILE to /dev/null I get the following:
> could not save history to file "/dev/null": Operation not permitted

Hm.  ktrace shows this happening:

 23279 psql     CALL  open(0x302d70,0x601,0x1b6)
 23279 psql     NAMI  "/dev/null"
 23279 psql     RET   open 3
 23279 psql     CALL  fchmod(0x3,0x180)
 23279 psql     RET   fchmod -1 errno 1 Operation not permitted
 23279 psql     CALL  close(0x3)
 23279 psql     RET   close 0
 23279 psql     CALL  write(0x2,0xbffff180,0x44)
 23279 psql     GIO   fd 2 wrote 68 bytes
       "could not save history to file "/dev/null": Operation not permitted
       "
 23279 psql     RET   write 68/0x44
 23279 psql     CALL  exit(0)

There's probably no way to get Apple's libedit to not try the fchmod,
so what do we want to do here?  Maybe special-case the string
"/dev/null"?

If this is OK, I can up with a patch that special cases /dev/null as a
HISTFILE if libedit is found.

- Martin -

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to