diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-05-12 22:40:14 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-05-12 22:40:14 +0300 |
commit | 330f73ad4bc9e2b54b1d77eb5988a945f0ffe55c (patch) | |
tree | 45057a68341808a496eae608ce047e60642101ec /builtin.c | |
parent | e2bfaff631c465275f8289385e95406d22a3aeda (diff) | |
parent | d7b4254cbf5f70d430e21f4f8ca90e354e251bac (diff) | |
download | egawk-330f73ad4bc9e2b54b1d77eb5988a945f0ffe55c.tar.gz egawk-330f73ad4bc9e2b54b1d77eb5988a945f0ffe55c.tar.bz2 egawk-330f73ad4bc9e2b54b1d77eb5988a945f0ffe55c.zip |
Merge branch 'master' into feature/cmake
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2110,6 +2110,10 @@ do_system(int nargs) cmd[tmp->stlen] = '\0'; os_restore_mode(fileno(stdin)); +#ifdef SIGPIPE + signal(SIGPIPE, SIG_DFL); +#endif + status = system(cmd); /* * 3/2016. What to do with ret? It's never simple. @@ -2141,8 +2145,12 @@ do_system(int nargs) } else ret = 0; /* shouldn't get here */ } + if ((BINMODE & BINMODE_INPUT) != 0) os_setbinmode(fileno(stdin), O_BINARY); +#ifdef SIGPIPE + signal(SIGPIPE, SIG_IGN); +#endif cmd[tmp->stlen] = save; } |