fork

Forking a FOSS-project's Git repository

I'm seriously starting to think that I need to fork an open source project, for it to suit my own needs. I've sent patches to the original author, but the responses have been pretty terse and, well, unwelcoming. Anyhow. I've read the question Forking an open source project nicely, but this doesn't answer my more specific question: What...

How can I get forking pipes to work in Perl on Windows?

I'm trying to port a Perl script over from Unix to Windows but am having a near impossible time getting it to work due to the unsupported forking pipes in the open function. Here's the code: sub p4_get_file_content { my $filespec = shift; return 'Content placeholder!' if ($options{'dry-run'}); debug("p4_get_file_content: $f...

Is there a fork of PHP4?

Has anybody forked PHP4 to continue support for this version? EDIT: This isn't a question about migrating to PHP5. ...

multiple fork() question

I have a parent with 5 child processes. I'm wanting to send a random variable to each child process. Each child will square the variable and send it back to the parent and the parent will sum them all together. Is this even possible? I can't figure it out... edit: this process would use shared memory. ...

Why does the child process here not print anything?

Assume all the variables have been declared previously... because they have been. The child process does not print anything which makes me think it's not being executed. The parent process runs fine, albeit it doesn't get the shared memory. I apologize for the length of this code... // create 5 child process for(int k=0;k<5;k++){ ...

Do you believe the Firefox project should be forked into a developer targeted version?

I've just got this idea that there is a need for a forked version of Firefox that would provide right out of the box tools for web development. Like FireBug, YSlow, FireCookie, LiveHTTPHeaders, etc. Maybe the fork should only include those extensions or take a further step and implement them in existing chrome. The reason I'm thinking ...

C++: Is it possible to share a pointer through forked processes?

I have a count variable that should get counted up by a few processes I forked and used/read by the mother process. I tried to create a pointer in my main() function of the mother process and count that pointer up in the forked children. That does not work! Every child seems to have it's own copy even though the address is the same in ...

unix-fork-monitor-child-progress

I have an application where a bit of parallel processing would be of benefit. For the purposes of the discussion, let's say there is a directory with 10 text files in it, and I want to start a program, that forks off 10 processes, each taking one of the files, and uppercasing the contents of the file. I acknowledge that the parent progr...

Reorganizing a project for expansion/reuse

The scope of the project I'm working on is being expanded. The application is fairly simple but currently targets a very specific niche. For the immediate future I've been asked to fork the project to target a new market and continue developing the two projects in tandem. Both projects will be functionally similar so there is a very str...

Meaning of wait((int *)0)

One such program that uses a wait function like this is this one: #include<stdio.h> #include<stdlib.h> int main() { int pid,fd[2]; int n; char line[20]; if(pipe(fd)<0) { printf("Error creating pipe"); } else { pid=fork(); if(pid<0) { printf("Error while forking"); } else { if(pid>0) { close(fd[0]); ...

Why am I getting an error when using vfork()?

This is my code... I don't know why I'm get an error segment... could somebody explain the reason to me? #include <iostream> #include <string> // Required by for routine #include <sys/types.h> #include <unistd.h> using namespace std; int globalVariable = 2; main() { string sIdentifier; int iStackVariable = 20; pid_t p...

How do I send large amounts of data from a forked process?

I have a ctypes wrapper for a library. Unfortunately, this library is not 100% reliable (occasional segfaults, etc.). Because of how it's used, I want the wrapper to be reasonably resilient to the library crashing. The best way to do this seems to be forking a process and sending the results back from the child. I'd like to do something...

How's Python Multiprocessing Implemented on Windows?

Given the absence of a Windows fork() call, how's the multiprocessing package in Python 2.6 implemented under Windows? On top of Win32 threads or some sort of fake fork or just compatibility on top of the existing multithreading? ...

What should I do to modify my fork() in C to run well?

I dont understand why my code does not work. This is my code. I don't know why I'm get an error segment. Could somebody explain the reason to me? #include <iostream> #include <string> #include <sys/types.h> #include <unistd.h> int id_process; void manager_signal () { kill (id_process, SIGKILL); kill (getppid(),SIGKILL); } in...

How to use system calls like fork, wait and exit in C to solve my problem?

I have this problem to solve that I have no idea how to do it because there's only a few system calls we can use to solve it and I don't see how they are helpful for the situation. The Exercise: I have matrix with size [10][1000000] with integers and for each line I create a new process with fork(). The idea of each process is to go thr...

ruby: how to fire and forget a subprocess?

Hi, I have a long running process and I need it to launch another process (that will run for a good while too). I need to only start it, and then completely forget about it. I managed to do what I needed by scooping some code from the Programming Ruby book, but I'd like to find the best/right way, and understand what is going on. Here'...

What are some conditions that may cause fork() or system() calls to fail on Linux?

And how can one find out whether any of them are occuring, and leading to an error returned by fork() or system()? In other words, if fork() or system() returns with an error, what are some things in Linux that I can check to diagnose why that particular error is happening? For example: Just plain out of memory (results in errno ENOM...

Java equivalent of fork in Java task of Ant?

Ant Java task provides fork parameter, which, by definition "if enabled triggers the class execution in another VM". As we are dealing with a large amount of data, setting this parameter saved us from running out of Java heap space. We want to be able to do the same through a Java class. What would be the best way to achieve the function...

What should the new license text include when forking a project?

When forking a project, what is the responsibility of the new project as regards the license text? Specifically, the BSD license (a permissive one), includes the text: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. So if I'm making a new version of the s...

Handling ungraceful shutdowns when using fork and sockets

I have a server that listens for socket connections and perform different kind of actions, depending on the request. One of them is long lived database queries, for which the server forks. The server keeps a log of all the active children and whenever asked to shutdown, it will kill all it's children before exiting. A couple of times I ...