Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Apr 1997 08:12:30 -0500 (EST)
From:      "John S. Dyson" <toor@dyson.iquest.net>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        current@freebsd.org, toor@dyson.iquest.net
Subject:   Re: You will need to recompile your libc and apps!!!
Message-ID:  <199704161312.IAA04459@dyson.iquest.net>
In-Reply-To: <199704160807.SAA03190@godzilla.zeta.org.au> from Bruce Evans at "Apr 16, 97 06:07:19 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> popen.c happens to be the only place in libc that uses vfork.  I think
> that system() should also use it.  The child in system() does only
> sigaction() and sigprocmask() calls.  This is a good example of where
> it is critical to know the difference between system calls and library
> functions - it is hard to tell whether a library function has any side
> effects.  OTOH, all the functions that are safe to call in signal handlers
> are probably safe to call in vfork()ed children, since any side effects
> would make them unsafe to call in signal handlers.  Unfortunately, _no_
                                                      ^^^^^^^^^^^^^^^^^^^
> syscalls are safe to call from signal handlers in FreeBSD, since all
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> syscalls may have the side effect of clobbering errno.  Fortunately,
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> clobbering errno probably is not a problem for vfork() - after a
> successful vfork(), the parent has no reason to check errno, and usually
> has reasons to distrust it (I forget if successful syscalls can clobber
> errno - what happens for
> 
> 	{ errno = 0; susccessful_syscall(); assert(errno == 0); } ?).
> 
Of course, that will be fixed before threads support is complete.

John



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704161312.IAA04459>