Skip to content

Adding pcntl_rfork.#3821

Closed
devnexen wants to merge 1 commit intophp:masterfrom
devnexen:freebsd_rfork
Closed

Adding pcntl_rfork.#3821
devnexen wants to merge 1 commit intophp:masterfrom
devnexen:freebsd_rfork

Conversation

@devnexen
Copy link
Copy Markdown
Member

Somewhat ressembling Linux's clone, while not matching its granularity,
it gives a bit more control over the classic fork/vfork.

@devnexen
Copy link
Copy Markdown
Member Author

I ll be rebasing this after unshare feature had been merged, thanks for its author for having opening the path :-)

@carusogabriel
Copy link
Copy Markdown
Contributor

Can't this go into PHP-7.4 branch?

@devnexen devnexen changed the base branch from master to PHP-7.4 February 14, 2019 08:14
@devnexen devnexen changed the base branch from PHP-7.4 to master February 14, 2019 08:15
@devnexen
Copy link
Copy Markdown
Member Author

Possibly ... not a "real" new feature as such but I would need to create a new PR then.

@petk
Copy link
Copy Markdown
Member

petk commented Feb 14, 2019

You can also first try clicking the edit above where the title is and change the target branch to point to PHP-7.4 if it goes through ok. Otherwise, yes, simplest is new pull request but probably the merger here will also know that this goes to PHP-7.4 first so new pull request is not needed just yet only for this. Thanks.

@devnexen
Copy link
Copy Markdown
Member Author

I did tried already but there is branches differences :-) but I can change it back no worries.

@devnexen devnexen changed the base branch from master to PHP-7.4 February 14, 2019 14:31
@petk
Copy link
Copy Markdown
Member

petk commented Feb 14, 2019

Ok, I see... Sorry for confusion then. Yes, master branch is better then for now so there is at least diff visible :D

@devnexen devnexen changed the base branch from PHP-7.4 to master February 14, 2019 14:45
@devnexen devnexen force-pushed the freebsd_rfork branch 3 times, most recently from d9148cb to ccd630f Compare February 18, 2019 21:29
@krakjoe
Copy link
Copy Markdown
Member

krakjoe commented May 11, 2021

So it looks like the usage you have in mind is to change signal delivery, my understanding is that you may also want to change fd tables behaviour but you don't seem to have registered the necessary constants ...

It also appears that this is only available on bsd variants, which means we're not currently testing it.

I'm not sure how generally useful it is to have the function available in PHP if it can only be used in BSD, can you point me to another example function with the same narrow scope ?

@devnexen
Copy link
Copy Markdown
Member Author

So it looks like the usage you have in mind is to change signal delivery, my understanding is that you may also want to change fd tables behaviour but you don't seem to have registered the necessary constants ...

It also appears that this is only available on bsd variants, which means we're not currently testing it.

Now is proper time to update this branch :-)

I'm not sure how generally useful it is to have the function available in PHP if it can only be used in BSD, can you point me to another example function with the same narrow scope ?

well pcntl supports also linux namespaces (unshare) it seems.

@krakjoe
Copy link
Copy Markdown
Member

krakjoe commented May 23, 2021

This looks more complete now, and I'm much happier to accept now that we can test ...

Pending CI result, if it looks good to you, it looks good to me ;)

@krakjoe
Copy link
Copy Markdown
Member

krakjoe commented May 31, 2021

Merged as 28382aa

Sorry it took so long to get back around to this ;)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants