1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
* sysdeps/posix/system.c (do_system): Add support for installation
	of cancellation handlers.
	* sysdeps/unix/sysv/linux/i386/system.c: New file.

	* stdlib/Makefile (tests): Add tst-system.
	* stdlib/tst-system.c: New file.
This commit is contained in:
Ulrich Drepper
2002-12-17 06:52:45 +00:00
parent 26a026b940
commit 3ca97e8f0f
5 changed files with 123 additions and 5 deletions

View File

@ -112,7 +112,15 @@ do_system (const char *line)
}
}
#ifdef CLEANUP_HANDLER
CLEANUP_HANDLER;
#endif
#ifdef FORK
pid = FORK ();
#else
pid = __fork ();
#endif
if (pid == (pid_t) 0)
{
/* Child side. */
@ -158,6 +166,10 @@ do_system (const char *line)
#endif
}
#ifdef CLEANUP_HANDLER
CLEANUP_RESET;
#endif
save = errno;
DO_LOCK ();
if ((SUB_REF () == 0