Reopen stderr

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17567 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2003-08-29 14:59:45 +00:00
parent a5bcb506e4
commit ac36615df6
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2003-08-29 Adam Fedor <fedor@gnu.org>
* Tools/gsnd/gsnd.m (main): Reopen stderr.
2003-08-29 Gregory John Casamento <greg_casamento@yahoo.com>
* NSToolbarItem.[hm]: Implemented copyWithZone: for NSCopying,

View file

@ -1102,6 +1102,13 @@ int main(int argc, char** argv, char **env)
gsnd_log(LOG_CRIT);
exit(EXIT_FAILURE);
}
if (is_daemon && open("/dev/null", O_WRONLY) != 2)
{
sprintf(ebuf, "failed to open stderr from /dev/null (%s)\n",
strerror(errno));
gsnd_log(LOG_CRIT);
exit(EXIT_FAILURE);
}
gsnd = [[SoundServer alloc] init];