[OFF TOPIC] Why is a process killed by close()?

Miklos Szeredi (Miklos.Szeredi@eth.ericsson.se)
Wed, 9 Sep 1998 15:50:07 +0200


This is not really a Linux related question, as I experienced it first
under Solaris. But it seems, that the linux behavior WRT this problem
changed in recent dev. kernels, so I thought, maybe someone knows the
answer.

The symptom is that a process is Kill-ed, when the file descriptors 0,
1 or 2 are close()-ed (or dup2()-ed). These file descriptors are
actually connected to /dev/null before closing.

The circumstances are rather foggy, while this all happens in a shared
library, which overrides some libc functions. This actually happens
inside an opendir() syscall made from tcsh, when TAB is pressed for
filename completion.

Thanks
Miklos Szeredi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html