Skip to content

Commit

Permalink
If vfork not available, shell command reports error.
Browse files Browse the repository at this point in the history
  • Loading branch information
slewsys committed May 29, 2024
1 parent 5fb1674 commit 1f268cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1724,8 +1724,14 @@ shell_cmd (ed_buffer_t *ed)
ed->exec->err = NULL;
if (!ed->exec->region->addrs)
{
#ifdef HAVE_VFORK
status = system_shell (++fn, ed);
printf (ed->exec->opt & SCRIPTED ? "" : "!\n");
#else
fprintf (stderr, "%s\n", _("Cannot fork shell"));
ed->exec->err = _("Fork error");
status = ERR;
#endif
}
else
#if defined (HAVE_FORK) && defined (WANT_EXTERNAL_FILTER)
Expand Down

0 comments on commit 1f268cc

Please sign in to comment.