comparison toys/posix/tee.c @ 1727:c0ef9b7976f0 draft

Use xsignal() instead of signal().
author Rob Landley <rob@landley.net>
date Tue, 10 Mar 2015 11:07:28 -0500
parents 786841fdb1e0
children 57f2a26fa92c
comparison
equal deleted inserted replaced
1726:26170eb7685d 1727:c0ef9b7976f0
43 TT.outputs = temp; 43 TT.outputs = temp;
44 } 44 }
45 45
46 void tee_main(void) 46 void tee_main(void)
47 { 47 {
48 if (toys.optflags & FLAG_i) signal(SIGINT, SIG_IGN); 48 if (toys.optflags & FLAG_i) xsignal(SIGINT, SIG_IGN);
49 49
50 // Open output files 50 // Open output files
51 loopfiles_rw(toys.optargs, 51 loopfiles_rw(toys.optargs,
52 O_RDWR|O_CREAT|((toys.optflags & FLAG_a)?O_APPEND:O_TRUNC), 52 O_RDWR|O_CREAT|((toys.optflags & FLAG_a)?O_APPEND:O_TRUNC),
53 0666, 0, do_tee_open); 53 0666, 0, do_tee_open);