mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Minor tidyup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14244 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
91b76f496f
commit
0b1c87f691
2 changed files with 15 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
|||
* Source/NSObject.m: Remove dealloc notifications hack ... the
|
||||
dealloc method can now safely be used to refrain from deallocating
|
||||
objects, so I don't think the hack is needed any more.
|
||||
* Tools/gdomap.c: Tidyup patch by Matthias Klose
|
||||
|
||||
2002-07-29 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
|
|
|
@ -4478,19 +4478,30 @@ printf(
|
|||
*/
|
||||
for (c = 0; c < FD_SETSIZE; c++)
|
||||
{
|
||||
if (c != 2)
|
||||
if (is_daemon || (c != 2))
|
||||
{
|
||||
(void)close(c);
|
||||
}
|
||||
}
|
||||
if (open("/dev/null", O_RDONLY) != 0)
|
||||
{
|
||||
perror("failed to open stdin from /dev/null\n");
|
||||
sprintf(ebuf, "failed to open stdin from /dev/null (%s)\n",
|
||||
strerror(errno));
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
}
|
||||
if (open("/dev/null", O_WRONLY) != 1)
|
||||
{
|
||||
perror("failed to open stdout from /dev/null\n");
|
||||
sprintf(ebuf, "failed to open stdout from /dev/null (%s)\n",
|
||||
strerror(errno));
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
}
|
||||
if (is_daemon && open("/dev/null", O_WRONLY) != 2)
|
||||
{
|
||||
sprintf(ebuf, "failed to open stderr from /dev/null (%s)\n",
|
||||
strerror(errno));
|
||||
gdomap_log(LOG_CRIT);
|
||||
exit(1);
|
||||
}
|
||||
if (debug)
|
||||
|
|
Loading…
Reference in a new issue