eval.c (e477abf734cc777a55286bfbd6b80a6760c96acf) | eval.c (d6d66cfc004b0fbdfe2906faf08b530facb704a3) |
---|---|
1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 1056 unchanged lines hidden (view full) --- 1065 if (e == EXINT) 1066 exitstatus = SIGINT+128; 1067 else if (e != EXEXIT) 1068 exitstatus = 2; 1069 goto cmddone; 1070 } 1071 handler = &jmploc; 1072 redirect(cmd->ncmd.redirect, mode); | 1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 1056 unchanged lines hidden (view full) --- 1065 if (e == EXINT) 1066 exitstatus = SIGINT+128; 1067 else if (e != EXEXIT) 1068 exitstatus = 2; 1069 goto cmddone; 1070 } 1071 handler = &jmploc; 1072 redirect(cmd->ncmd.redirect, mode); |
1073 outclearerror(out1); |
|
1073 /* 1074 * If there is no command word, redirection errors should 1075 * not be fatal but assignment errors should. 1076 */ 1077 if (argc == 0) 1078 cmdentry.special = 1; 1079 listsetvar(cmdenviron, cmdentry.special ? 0 : VNOSET); 1080 if (argc > 0) 1081 bltinsetlocale(); 1082 commandname = argv[0]; 1083 argptr = argv + 1; 1084 nextopt_optptr = NULL; /* initialize nextopt */ 1085 builtin_flags = flags; 1086 exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv); 1087 flushall(); | 1074 /* 1075 * If there is no command word, redirection errors should 1076 * not be fatal but assignment errors should. 1077 */ 1078 if (argc == 0) 1079 cmdentry.special = 1; 1080 listsetvar(cmdenviron, cmdentry.special ? 0 : VNOSET); 1081 if (argc > 0) 1082 bltinsetlocale(); 1083 commandname = argv[0]; 1084 argptr = argv + 1; 1085 nextopt_optptr = NULL; /* initialize nextopt */ 1086 builtin_flags = flags; 1087 exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv); 1088 flushall(); |
1089 if (outiserror(out1)) { 1090 warning("write error on stdout"); 1091 if (exitstatus == 0 || exitstatus == 1) 1092 exitstatus = 2; 1093 } |
|
1088cmddone: 1089 if (argc > 0) 1090 bltinunsetlocale(); 1091 cmdenviron = NULL; 1092 out1 = &output; 1093 out2 = &errout; 1094 freestdout(); 1095 handler = savehandler; --- 250 unchanged lines hidden --- | 1094cmddone: 1095 if (argc > 0) 1096 bltinunsetlocale(); 1097 cmdenviron = NULL; 1098 out1 = &output; 1099 out2 = &errout; 1100 freestdout(); 1101 handler = savehandler; --- 250 unchanged lines hidden --- |