forking

Forking an open source project nicely

It's time. You've worked long and hard to add your vision to the open source project you love, on which you've worked, debated, and to which you've contributed inestimable amounts of code and insight. But it's not going to work out with the existing developers. You finally need to fork the code. How do you do this and remain on the b...

What's the best way to fork/thread in PHP on Win?

I have a php script that checks for updates on many (thousands) of sites. On occasion (more frequently as the number of sites increases), I get an execution timeout on the update of one of these sites, and the whole script goes down the drain. The best idea I could come up with is to fork each update, so if it dies, the overall update j...

Problem with a Python program using os.pipe and os.fork()

Hello, I've recently needed to write a script that performs an os.fork() to split into two processes. The child process becomes a server process and pases data back to the parent process using a pipe created with os.pipe(). The child closes the 'r' end of the pipe and the parent closes the 'w' end of the pipe, as usual. I convert the re...

Returning data from forked processes

If I do Process.fork do x end how can I know what x returned ? (e.g. true/fase/string) ? (writing to a file/database is not an option...) ...

Managing local forks of Maven dependencies

So I have a dependency, actually two dependencies to which I'd like to make changes either right now like fixing JBSEAM-3424 or potentially in the future. The coding is not an issue - I'm capable of making the change - and I'm not seeking to fork the community project, just to have a local version as recommended by Will Hartung to get so...

PHP Forking Randomly Does Parent Or Child Process Depending On What Finished First what am i doing wrong ?

Hey there, I have a simple script that which is suppose to load 2 separate pages at the same time and grab some text from them, however it loads either the parent process or the child process depending on what finishes first, what am i doing wrong ? I want the 2 processes to work simultaneously, here is the example code: <?php $pid = ...

help with python forking child server for doing ajax push, long polling

Alright, I only know some basic python but if I can get help with this then I am considering making it open source. What I am trying to do: - (Done) Ajax send for init content - Python server recv command "init" to send most recent content - (Done) Ajax recv content and then immediately calls back to python server - Python server recv c...

Forking on Google Code (or any other SVN hosting)

Sites like github, bitbucket provides an excellent/useful feature of "forking" projects. This allows one to simply fork a project and work on their desired features (before submitting it to the projector owner and getting commit access). How is this workflow best achieved for SVN projects (especially the various ones hosted on Google Co...

Running forked php apps

What are the downsides to running a forked PHP app on the web? I have read that it should not be run under Apache for any reason, but never explained why. The only reason I can think of is that if a script is terminated in the middle of execution, any forked process would never be terminated and might cause memory leaks. The question...

Where can I find benchmarks on different networking architectures?

Where can I find benchmarks on different networking architectures? I am playing with sockets / threads / forks and I'd like to know what the best is. I was thinking there has got to be a place where someone has already spelled out all the pros and cons of different architectures for a socket service, listed benchmarks with code that run...

Spawning multiple processes with PHP to proccess data.

I have a queue (Amazon SQS) of data that needs to be processed, and I would like to do it with multiple processes (in PHP). I want the child workers to do something like this (pseduoish code): while(true) { $array = $queue->fetchNItems(10); // get 10 items if(!count($array)) killProcess(); foreach($array as $...

Where to find info about maintain forks (branch, but not a repo-branch) of code where both are developing separately?

I'm looking for advice on a code maintenance situation I expect is common, but difficult to describe in three words, so difficult to find info about online. Note that I'm talking about a code project branching, but not in the sense of a 'subversion branch'. There's an existing software product that is still being developed. Another team...

PHP forking php-fpm with pcntl_fork()

I'm forking with this code: echo "1. posix_getpid()=".posix_getpid().", posix_getppid()=".posix_getppid()."\n"; $pid = pcntl_fork(); var_dump($pid); if ($pid == -1) die("could not fork"); if ($pid) { //parent echo "2. pid=".$pid.", posix_getpid()=".posix_getpid().", posix_getppid()=".posix_getppid()."\n"; } else { //child $sid = posix...

What happens when a process is forked?

I've read about fork and from what I understand, the process is cloned but which process? The script itself or the process that launched the script? For example: I'm running rTorrent on my machine and when a torrent completes, I have a script run against it. This script fetches data from the web so it takes a few seconds to complete. D...

php process forking and get the child process id

Hi all, Objective: My script will download a remote file upon form submission, since the file might be big, I would like to fork off a process and let the user go on with his/her life. Example of a command: wget -q --limit-rate=1k --tries=10 "http://helios.gsfc.nasa.gov/image_euv_press.jpg" -O /web/assets/content/image/image_euv_press...

forks in C - exercise

I try to repeat and learn more advanced uses and options when cutting trees with forks in the jungle of C. But foolishly I find an example which should be very easy as I have worked with forks before and even written some code, but i can't understand it fully. Here comes : main() { if (fork() == 0) { if (fork() == 0) { printf("3...

iPhone programming - problem with CoreFoundation forking

Hello all, I've been working on an iPhone for several months. It's a 2d shooting game akin to the old Smash TV type games. I'm doing everything alone and it has come out well so far, but now I am getting unpredictable crashes which seem to be related to CoreFoundation forking and not exec()ing, as the message __THE_PROCESS_HAS_FORKE...

Permission error while trying to access an (server) program started by a Java program.

I am starting a server application (normally to be started from the Unix command line) by using Runtime.getRuntime().exec("path/mmserver"). My problem is now that as long as my Java program, which started that server runs, the server is correctly accessible (from command line and other programs). But when my Java program exits the sever ...

Improving HTML scrapper efficiency with pcntl_fork()

With the help from two previous questions, I now have a working HTML scrapper that feeds product information into a database. What I am now trying to do is improve efficiently by wrapping my brain around with getting my scrapper working with pcntl_fork. If I split my php5-cli script into 10 separate chunks, I improve total runtime by a...

How to switch repositories from one to the next

I was using a github repository from a previous developer. I am the only coder on this project, so I forked the project over to my own github repository. Now I would like to commit soley to my repo. Unfortunately, I realized that I never changed my .git/config , so I was still committing to the old repo. I just changed it to the appro...