linux - DIFFERENT TASKS ASSIGNED TO DIFFERENT INSTANCES OF FORK() OF A PROCESS IN C -


Can I assign different tasks to different instances of a fork () of a process in C Can i do For example:

program.c has been forked 3 times

  int main () {pid_t pid; Pid = fork (); pid = fork (); Pid = fork (); }   

Now for every example of fork () I want to talk differently, can I do this? With forks? Or is there any other method if friendly? :)

PS: I am testing Real Time Linux and want to check the projection performance through the fork through time constraints.

You can use the pox process.

posix_spawn (& amp; ; Pid, ​​ProgramPath.c_str (), & amp; File Actions, & amp; SpawnAttr, argv, envp);

See its documentation.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -