Compare commits
No commits in common. "4dcee8f828b85c4110e20f1c3ff00b11ffa11753" and "3a51807fa6120ae7556651d5a3e1e8d5feaf02af" have entirely different histories.
4dcee8f828
...
3a51807fa6
@ -88,7 +88,7 @@ Result<int> luna_main(int argc, char** argv)
|
|||||||
auto cmd = TRY(input_file->read_line());
|
auto cmd = TRY(input_file->read_line());
|
||||||
if (cmd.is_empty())
|
if (cmd.is_empty())
|
||||||
{
|
{
|
||||||
if (interactive) puts("exit");
|
puts("exit");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,14 +184,11 @@ extern "C"
|
|||||||
{
|
{
|
||||||
if (!cmd)
|
if (!cmd)
|
||||||
{
|
{
|
||||||
struct stat st;
|
// FIXME: Check if there is a shell available in the system.
|
||||||
if (stat("/bin/sh", &st) < 0) return 0;
|
errno = ENOTSUP;
|
||||||
return S_ISREG(st.st_mode);
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: During the execution of system(), SIGCHLD will be blocked, and SIGINT and SIGQUIT will be ignored, in
|
|
||||||
// the process that calls system().
|
|
||||||
|
|
||||||
pid_t child = fork();
|
pid_t child = fork();
|
||||||
if (child == 0)
|
if (child == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user