6 Jun
2012
6 Jun
'12
19:32
https://bugzilla.novell.com/show_bug.cgi?id=728774 https://bugzilla.novell.com/show_bug.cgi?id=728774#c44 Jeff Mahoney <jeffm@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kernel-maintainers@forge.pr |jeffm@suse.com |ovo.novell.com | --- Comment #44 from Jeff Mahoney <jeffm@suse.com> 2012-06-06 15:31:57 EDT --- > after discussing this with upstream systemd, it is suggested to get the kernel > fixed one time for all to handle dup on a socket. What isn't working correctly with dup on a socket? It's functionally equivalent to forking. The same struct file (and obviously as a result, the same socket) just get their refcount incremented and are assigned to an additional fd. Can you provide a link to the discussion? Perhaps I'm missing something. /dev/stderr pointing to a socket will *always* return -ENXIO. This is by design. >From net/socket.c: /* * In theory you can't get an open on this inode, but /proc provides * a back door. Remember to keep it shut otherwise you'll let the * creepy crawlies in. */ static int sock_no_open(struct inode *irrelevant, struct file *dontcare) { return -ENXIO; } It might be enough to allow the open to proceed if the opener owns the socket. Then it's functionally equivalent to the dup case. (In reply to comment #3) > I've replaced '>/dev/stderr' with '1>&2' on line 54 of /etc/rc.status -> > Problem gone! > > Please fix this in the distribution package... This may not be the "correct" answer but it _will_ work. The big thing is that redirecting to /dev/stderr *isn't* the same as as 1>&2. File descriptor 2 is already open with the 1>&2 case. The file descriptor used for > /dev/stderr will never be 2. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.