aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 2d457b3c84c..1337d2b9de1 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1306,29 +1306,29 @@ emacs_posix_spawn_init_actions (posix_spawn_file_actions_t *actions,
1306 return error; 1306 return error;
1307 1307
1308 error = posix_spawn_file_actions_adddup2 (actions, std_in, 1308 error = posix_spawn_file_actions_adddup2 (actions, std_in,
1309 STDIN_FILENO); 1309 STDIN_FILENO);
1310 if (error != 0) 1310 if (error != 0)
1311 goto out; 1311 goto out;
1312 1312
1313 error = posix_spawn_file_actions_adddup2 (actions, std_out, 1313 error = posix_spawn_file_actions_adddup2 (actions, std_out,
1314 STDOUT_FILENO); 1314 STDOUT_FILENO);
1315 if (error != 0) 1315 if (error != 0)
1316 goto out; 1316 goto out;
1317 1317
1318 error = posix_spawn_file_actions_adddup2 (actions, 1318 error = posix_spawn_file_actions_adddup2 (actions,
1319 std_err < 0 ? std_out 1319 std_err < 0 ? std_out
1320 : std_err, 1320 : std_err,
1321 STDERR_FILENO); 1321 STDERR_FILENO);
1322 if (error != 0) 1322 if (error != 0)
1323 goto out; 1323 goto out;
1324 1324
1325 error = 1325 /* Haiku appears to have linkable posix_spawn_file_actions_chdir,
1326#ifdef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1326 but it always fails. So use the _np function instead. */
1327 posix_spawn_file_actions_addchdir 1327#if defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR && !defined HAIKU
1328 error = posix_spawn_file_actions_addchdir (actions, cwd);
1328#else 1329#else
1329 posix_spawn_file_actions_addchdir_np 1330 error = posix_spawn_file_actions_addchdir_np (actions, cwd);
1330#endif 1331#endif
1331 (actions, cwd);
1332 if (error != 0) 1332 if (error != 0)
1333 goto out; 1333 goto out;
1334 1334
@@ -1347,9 +1347,9 @@ emacs_posix_spawn_init_attributes (posix_spawnattr_t *attributes,
1347 return error; 1347 return error;
1348 1348
1349 error = posix_spawnattr_setflags (attributes, 1349 error = posix_spawnattr_setflags (attributes,
1350 POSIX_SPAWN_SETSID 1350 POSIX_SPAWN_SETSID
1351 | POSIX_SPAWN_SETSIGDEF 1351 | POSIX_SPAWN_SETSIGDEF
1352 | POSIX_SPAWN_SETSIGMASK); 1352 | POSIX_SPAWN_SETSIGMASK);
1353 if (error != 0) 1353 if (error != 0)
1354 goto out; 1354 goto out;
1355 1355