Fix daemon issues caused by Ubuntu's surprising intermediary shell
ClosedPublic

Authored by epriestley on May 2 2011, 4:56 PM.
Tags
None
Tokens
"Like" token, awarded by underyx."Like" token, awarded by davidme."Baby Tequila" token, awarded by floo51."Evil Spooky Haunted Tree" token, awarded by heinzbeinz."Like" token, awarded by test13254."The World Burns" token, awarded by eric.summers."Orange Medal" token, awarded by rohan03ace."Like" token, awarded by demo."Piece of Eight" token, awarded by jamesmarrone3."Like" token, awarded by adil.atilgan."Love" token, awarded by Magicfuture."Baby Tequila" token, awarded by karan.kanwar."Doubloon" token, awarded by joostfaassen."Yellow Medal" token, awarded by rmatrono."Like" token, awarded by jasdeep."Pterodactyl" token, awarded by sandro.giessl."The World Burns" token, awarded by chad."Like" token, awarded by shochdoerfer."Evil Spooky Haunted Tree" token, awarded by JimLiu."Love" token, awarded by bvb."Like" token, awarded by owenchu."The World Burns" token, awarded by yccheok."Like" token, awarded by jk."Baby Tequila" token, awarded by srodal.

Details

Summary

On OSX and other Linuxii, proc_open('./exec_daemon ...') opens a PHP process; on Ubuntu it opens a "sh -c" process which opens a PHP process. The existence of this surprising shell made everything stop working.

Use 'exec' to replace the shell with the PHP process.

Test Plan

Ran daemons on OSX and Ubuntu, behavior seems okay in all cases.

Keep in mind I have absolutely no idea how Lunix works so this probably breaks the world. (cc: simpkins)

Diff Detail

Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
There are a very large number of changes, so older changes are hidden. Show Older Changes

clowncopterize??!?

Just tested phabricator,
LGTM

src/daemon/overseer/PhutilDaemonOverseer.php
20

Yes, comments are good!
Testing phabricator....

142

testing...

a.veretennikov added inline comments.Apr 9 2013, 11:42 AM
src/daemon/overseer/PhutilDaemonOverseer.php
26–36

Hello world! :)

src/daemon/overseer/PhutilDaemonOverseer.php
148

test reply

test

src/daemon/overseer/PhutilDaemonOverseer.php
136–141

ggg

_bhaisaab added inline comments.Apr 21 2013, 4:12 PM
src/daemon/overseer/PhutilDaemonOverseer.php
26–34

this works, why private, mutable states oh!

The Future is ready

asdsadl;lkadlalsjda

src/daemon/overseer/PhutilDaemonOverseer.php
135

fswfksjflksdjf

165

kkk

I want everyone to welcome me to the peanut gallery.

Testing.. line number 170 on left not correct

fdfdfdfdfdffdfdfdfdfdfdfdfdfdfddfdfdfadfad

nice

src/daemon/overseer/PhutilDaemonOverseer.php
184

Last line test

{highlight=25} hello

{D123, lines=124}

src/daemon/overseer/PhutilDaemonOverseer.php
185–187

Multiline comment shoo

Thanks

src/daemon/overseer/PhutilDaemonOverseer.php
135

Seems like OK

fabianbuch added inline comments.Aug 27 2013, 2:58 PM
src/daemon/overseer/PhutilDaemonOverseer.php
177–179
  • foo
  • bar
testleg added inline comments.Sep 12 2013, 9:46 AM
src/daemon/overseer/PhutilDaemonOverseer.php
184

I expect you also mean foo and bar as fabian suggested above... It's definitely safer to use foo but if you want it to run fast and you're not worried by the occasional fooble meltdown then you can use bar here too.

lukianovva added inline comments.Nov 1 2013, 6:43 AM
src/daemon/overseer/PhutilDaemonOverseer.php
128

И придраться-то не к чему :)

eep added inline comments.Nov 6 2013, 11:49 PM
src/daemon/overseer/PhutilDaemonOverseer.php
24

Good use of 'class' keyword

Macro grumpy: above below

src/daemon/overseer/PhutilDaemonOverseer.php
24

Yep. Big fan.

Will the Future ever be ready?

shaneduffy added inline comments.Dec 20 2013, 1:34 PM
src/daemon/overseer/PhutilDaemonOverseer.php
133

Tihsihsidhs

134

testing

JimJam added inline comments.Dec 21 2013, 12:39 AM
src/daemon/overseer/PhutilDaemonOverseer.php
195

Hit the road, buffers, and doncha come back no more, no more, no more, no more.

tommycrush added inline comments.Dec 22 2013, 6:15 AM
src/daemon/overseer/PhutilDaemonOverseer.php
190–192

yay

201–203

gah

adding a comment to test this demo

There's too much purple in this codebase!

src/daemon/overseer/PhutilDaemonOverseer.php
24

Down with the Bourgeoisie class system!

Missing @license tag in class comment (at line 17)

src/daemon/overseer/PhutilDaemonOverseer.php
154

Closing parenthesis of a multi-line function call must be on a line by itself (at line 89)

Macro wizardhat: hello world not really.....going back to my cave now

src/daemon/overseer/PhutilDaemonOverseer.php
145

your comment is extremely helpful

Why I eyes ya.

epriestley changed the visibility from "All Users" to "Public (No Login Required)".Mar 6 2014, 10:25 PM
sunzhen1991 added inline comments.Jan 6 2015, 7:36 AM
src/daemon/overseer/PhutilDaemonOverseer.php
43

test11

WouterSioen added inline comments.
src/daemon/overseer/PhutilDaemonOverseer.php
35

?

dheerendra added inline comments.
src/daemon/overseer/PhutilDaemonOverseer.php
26–34

Re comment

29

I added this comment

31

My comment

43

I can reply too!!!!!!

44

@sunzhen How can I repy you

briany12 added inline comments.
src/daemon/overseer/PhutilDaemonOverseer.php
24

inline comment.

satbirjhuti added inline comments.
src/daemon/overseer/PhutilDaemonOverseer.php
137

MUCH ROOT! SUCH COMMENT!

This comment was removed by lwjchaos.