comparison main.c @ 1299:313980d3d78c draft

Add generic_signal() handler, which sets toys.signal and writes byte to toys.signalfd if set.
author Rob Landley <rob@landley.net>
date Wed, 21 May 2014 07:24:16 -0500
parents 1f4a56212c83
children 726d3e67d8c1
comparison
equal deleted inserted replaced
1298:c25ee9918e65 1299:313980d3d78c
78 toys.optargs = argv+1; 78 toys.optargs = argv+1;
79 for (toys.optc=0; toys.optargs[toys.optc]; toys.optc++); 79 for (toys.optc=0; toys.optargs[toys.optc]; toys.optc++);
80 } 80 }
81 toys.old_umask = umask(0); 81 toys.old_umask = umask(0);
82 if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask); 82 if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask);
83 toys.signalfd--;
83 } 84 }
84 85
85 // Setup toybox global state for this command. 86 // Setup toybox global state for this command.
86 87
87 void toy_init(struct toy_list *which, char *argv[]) 88 void toy_init(struct toy_list *which, char *argv[])