Sitelet https://github.com/jobbyphp/jobby/pull/103
Skip to content

Split stdout and stderr in different files - #103

Merged
hellogerard merged 3 commits into
jobbyphp:masterfrom
qconer:split-stdout-and-stderr
Nov 15, 2018
Merged

hellogerard merged 3 commits into
jobbyphp:masterfrom
qconer:split-stdout-and-stderr

Conversation

@qconer

@qconer qconer commented Sep 13, 2018

Copy link
Copy Markdown
Contributor

feature to allow splitting stdout and stderr output

@hellogerard

Copy link
Copy Markdown
Member

@qconer Hi, this looks great. Can you convert all your tabs to spaces before I merge this PR? It's throwing off the diffs.

@qconer

qconer commented Nov 15, 2018 •

Copy link
Copy Markdown
Contributor Author

@qconer Hi, this looks great. Can you convert all your tabs to spaces before I merge this PR? It's throwing off the diffs.

@hellogerard Hi. Already.

This PR also closing an issue #79

@hellogerard
hellogerard merged commit f7090cc into jobbyphp:master Nov 15, 2018
@garethellis36

Copy link
Copy Markdown
Contributor

This change breaks Jobby on Windows. Any jobs which have an output file specified result in the following error:
The process cannot access the file because it is being used by another process

I did some debugging and found that the culprit is the exec line in BackgroundJob. When an output file is specified and no stderr is specified, Windows tries to write to the same file for both with the following syntax:
exec("$useSudo $command 1>> \"$stdoutLogfile\" 2>> \"$stderrLogfile\"", $dummy, $retval);

However, this is not valid syntax for Windows. The correct syntax is shown here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants