Displaying 2 results from an estimated 2 matches for "clear_traps".
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...struct job *jp, union node *n, int mode)
+static void forkchild(struct job *jp, union node *n, int mode)
{
+ int lvforked;
int oldlvl;
TRACE(("Child shell %d\n", getpid()));
+
oldlvl = shlvl;
- shlvl++;
+ lvforked = vforked;
+
+ if (!lvforked) {
+ shlvl++;
+
+ closescript();
+ clear_traps();
+
+#if JOBS
+ /* do job control only in root shell */
+ jobctl = 0;
+#endif
+ }
- closescript();
- clear_traps();
#if JOBS
- /* do job control only in root shell */
- jobctl = 0;
if (mode != FORK_NOJOB && jp->jobctl && !oldlvl) {
pid_t pgrp;
@@ -878,17 +891,30 @@ f...
2004 Oct 18
0
Error building ash: trap.c:398: error: conflicting types for 'onsig'
...e
pointer type
make[1]: *** [trap.o] Error 1
make[1]: Leaving directory `/home/daniel/kernel/klibc-0.186/ash'
make: *** [all] Error 2
This fixes it for me:
--- ash/trap.h.old 2004-10-19 00:04:21.021269720 +0000
+++ ash/trap.h 2004-10-19 00:04:37.218807320 +0000
@@ -40,7 +40,7 @@
void clear_traps(int);
long setsignal(int, int);
void ignoresig(int, int);
-void onsig(int);
+__cdecl void onsig(int);
void dotrap(void);
void setinteractive(int);
void exitshell(int) __attribute__((__noreturn__));
Daniel Thaler