Skip to content

Commit 50c0475

Browse files
Make skip_fork a bool
1 parent 2a91a76 commit 50c0475

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exec.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ void exec(parser_t &parser, job_t *j)
11291129

11301130
case INTERNAL_BUILTIN:
11311131
{
1132-
int skip_fork;
1132+
bool skip_fork;
11331133

11341134
/*
11351135
Handle output from builtin commands. In the general
@@ -1165,7 +1165,7 @@ void exec(parser_t &parser, job_t *j)
11651165
{
11661166
const std::string res = wcs2string(get_stdout_buffer());
11671167
io->out_buffer_append(res.c_str(), res.size());
1168-
skip_fork = 1;
1168+
skip_fork = true;
11691169
}
11701170

11711171
if (! skip_fork && j->io.empty())
@@ -1179,15 +1179,15 @@ void exec(parser_t &parser, job_t *j)
11791179
const std::string outbuff = wcs2string(out);
11801180
const std::string errbuff = wcs2string(err);
11811181
do_builtin_io(outbuff.data(), outbuff.size(), errbuff.data(), errbuff.size());
1182-
skip_fork = 1;
1182+
skip_fork = true;
11831183
}
11841184

11851185
for (io_chain_t::iterator iter = j->io.begin(); iter != j->io.end(); iter++)
11861186
{
11871187
io_data_t *tmp_io = *iter;
11881188
if (tmp_io->io_mode == IO_FILE && strcmp(tmp_io->filename_cstr, "/dev/null") != 0)
11891189
{
1190-
skip_fork = 0;
1190+
skip_fork = false;
11911191
break;
11921192
}
11931193
}

0 commit comments

Comments
 (0)