[solved: answer=yes] Can child processes fork()?

As an exercise, I've been wanting to design a shell with better string-handling capabilities than bash — get around the quote-escaping problem, etc. But before I continue, I need to know: are fork()-ed child processes allowed to themselves fork()?
I ask because shells execute commands by fork()-exec(). But you start a subshell to a script? It then has to fork()-exec() the commands therein on its own...
It seems like this wouldn't work because in the child process, fork() returns 0. Or is this only for the fork() call that created it?
Last edited by Peasantoid (2009-05-23 18:11:35)

They can. Daemons for example do this, and they simply use a structure like if fork() == 0 { if fork() == 0 { daemon_main() ; } EXIT* }
*EDIT
Last edited by Procyon (2009-05-23 17:36:47)

Similar Messages

  • Why can not I see the name of a child process?

    Hi,
    I implemented a program for my project.
    My program has two processes. One is a parent process. Another is a child process.
    The parent process forks its child process. The child process is executed by execl() system call.
    The program code implemented is followed.
    === abbreviation ===
    switch(itmr_forkid = fork()) {
    case 0:
    RCode = execl("./itmr", "itmr", (char *) 0);
    exit(0);
    break;
    === abbreviation ===
    I executed the program. And then I pressed "ps -ef" on command line.
    [stp1ggsn1][user/shlim] ps -ef
    UID PID PPID C STIME TTY TIME      CMD
    root 29402 29376 38 Mar 06 pts/0 11376:36 ibgfb
    root 29403 29402 0 Mar 06 pts/0 0:15
    However, why can not I see itmr process name for the child process?
    When I executed the program for the parent process and the program for the child process respectively, I can see itmr process name for the child process.
    I tried to look for the cause. But I could not find out the answer.
    Please, give me your answer. Thank you for your answer in advance.

    Hi,
    I am sorry that I loaded my question two times by mistake.

  • SunMC - Process is forking and reaping child processes. What's that?

    Hey folks,
    Im really new to the sysadmin world, and I think maybe my company really didn't think things well when they've decided to put me doing this, hehehe.
    I work with a general queue for which my team receives tickets with different kind of problems, among them, Automation Alerts (I think you all know what Im talking about).
    Recently (maybe 2-4 days) we've started to receive an Automation Ticket with the following message:
    Solaris Process Monitoring Process Monitoring Base03 CPU
    time for reaped children 107.1 30.0 Process is forking and
    reaping child processes.
    I've found almost nothing about this, and even when I think what's this ticket about (I've closed 2 or 3 of them stating no issues were found), I really want to understand and know where to look and if something can be done about this, because processes on the server and general state of it seems in good condition and nothing looks bad, apparently. The server is a Solaris 10 with zones.
    Can you shed some light on this? I'd appreciate all the help you can give me.
    Thank you and regards all.

    The same thought occurred to me, except I started seeing "failure" logs in JAMF the morning after we run maintenance policies. All of these failures were due to the Mac not restarting, which isn't really a failure - more of an inconvenience - since the second part of the policy (removing eTrust antivirus and restarting is part 1, installing SEP 12.1 and restarting is part 2) runs immediately on restart no matter what time of the day it is.
    In some cases the macs did not restart because the user had unsaved work or something else that would cancel logout. In this case, Casper prompts the user to restart and waits until the OK button is clicked, then counts down 1 minute and restarts. In the other case, nothing would have prevented logout yet the computer still did not logout and then restart, leading me to believe that the reason the Mac did not log out was a locked desktop, and since I am telling System Events to simulate a gui log out, this would be blocked by a locked desktop.
    The problem basically stems from the following two issues: 1. I am not to force a logout or restart when a console user is logged in and 2. Casper will not automatically log a console user out on it's own OR restart the computer if a console user is logged in - and then I have to rely on the end user to follow on screen instructions since the Casper restart prompt can be moved to the side and effectively ignored.
    When no restarts are required for the various policies we run, this is not an issue. And anyway, I originally just wanted to know what process is running when a desktop is asleep and locked, but no screen saver is active...

  • [Solved] Bash: killing child processes

    I decided to make a session manager that will kill all child processes before exiting, the only problem is that it doesn't kill them all.
    I tried using the same function, and using it in conjunction with
    yes >/dev/null & bash
    yes >/dev/null & bash
    yes >/dev/null & bash
    yes >/dev/null & bash
    running in a terminal, and it sent all of them the TERM signal.
    I'm out of ideas.
    Code is here.
    The relevant section is:
    # Kill child process of given parent
    # This uses PIDs not names
    # Also prints out a list of child pids that should be killed
    # FIXME: Clean this up a bit
    kill_child_processes()
    PARENT_ID=$1
    # Find child processes and put them in the form PID%seperator%COMMAND
    local CHILD_PROCESSES=$(ps o ppid,pid,command | \
    awk "{if (\$1 == $PARENT_ID) {print \$2,\"_\",\$3;}}" | \
    sed 's| _ |%seperator%|')
    # Do this for each child
    for child in $CHILD_PROCESSES; do
    # Extract the PID and COMMAND into separate variable from $child
    local child_pid=$(echo $child | sed 's|%seperator%.*||')
    local child_command=$(echo $child | sed 's|.*%seperator%||')
    # If the child command has child processes, recurse through it
    if [ "$(ps o ppid,pid,command | awk "{if (\$1 == $child_pid) {print \$2;}}")" != "" ]; then
    kill_child_processes $child_pid
    fi
    # If the command isn't part of a blacklist, send it the TERM signal
    if [ x$(for dont_kill_command in $DONT_TERM; do \
    [ x$dont_kill_command == x$child_command ] && echo "MATCH"; \
    done) == x"" ]; then
    kill $child_pid &
    # echo the PID so we can use it later
    echo $child_pid
    fi
    done
    Thanks.
    Last edited by some-guy94 (2010-01-13 22:48:39)

    gradgrind wrote:You might like to try pkill / pgrep with the -g option?
    Unfortunately that isn't what I'm looking for, I want this to work with multiple sessions(not that difficult), and also work with other apps on other tty's.
    Currently what it does is it runs ps o ppid,pid,command x which gives a nice table
    1234 5678 command1
    1234 5679 command2
    and if the ppid matches the session's pid, it's pid is saved, and (this part is looped) if it has child processes, then the function is run on the pid, afterward the pid is killed.
    It works when I separate the function from the rest of the script, but when it is in a session it fails to work properly.
    Last edited by some-guy94 (2010-01-05 23:11:57)

  • How can I pass environment variables to the child process?

    How can I pass environment variables to the child process? This is what I tried and it didn't work.
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("The value of custom.property is : " + System.getProperty("custom.property"));
         }and the result is:
    The value of custom.property is : null

    Complete test:
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-Dcustom.property=my property value", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my environment value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("Property value of custom.property is : " + System.getProperty("custom.property"));
              System.out.println("Environment value of custom.property is : " + System.getenv("custom.property"));          
         }

  • How many parallel BPEL child processes can be invoked on single BPEL server

    Hi,
    Can anyone pls let me know
    1. How many parallel BPEL child processes can be invoked on single BPEL server at same time?
    2. How number of Invoker threads, Worker threads and DB connection pools are affecting the BPEL server's listener thread spawning capacity?
    Thanks in advance.
    -S

    Hi James
    Here is my problem. I need to do this for load balancing. I have two instances of SOA Suite running on single machine, i.e. two different BPEL servers. Now i need 2 BPEL instances on each server, i.e. two SOA Suite and four BPEL instances (Two BPEL servers on each SOA Suite)
    I tried to create a new OC4J instance on my app server and named it as OC4J_new. By default OC4J instance would have these application installed:
    ascontrol
    ccore
    coreman
    datatags
    default
    esb-dt
    esb-rt
    gateway
    hw_services
    javasso
    orabpel
    orainfra
    policymanager
    ruleauthor
    rulehelp
    But when i create new OC4J instance, i can see only these applications:
    ascontrol
    datatags
    default
    javasso
    How do i get rest of the applications in my new OC4J Instance??
    I tried deploying .EAR files but it failed all the time. What are possible fixes?
    Many thanks in advance

  • [SOLVED]Can Some Processes Not Run In Background

    Hi,
    Can some process just not run in the background? I have an irc bot and I want irssi to continue running even after I exit. I do
    $irssi
    ctrl-z
    bg
    But after bg it says
    [1] irssi &
    [1] irssi STOPPED
    I've also tried sending the kill CONT signal but it just always stops. Is there another way I should do it for this type of process? Thanks!
    Last edited by Prototype (2014-02-09 03:42:08)

    karol wrote:If you're asking how to background irssi, read http://www.hants.lug.org.uk/wiki/LinuxHints/Screen http://tmux.sourceforge.net/
    Is there no way to run irssi in the background (disowned) with just the built in bash commands? My main goal is to have it running (with me logged into servers) when I exit the terminal.
    Last edited by Prototype (2014-02-09 03:26:24)

  • When ask me about my security question i cant remember my answer, how can i solve this problem?

    when ask me about my security question i cant remember my answer, how can i solve this problem?

    Go to:
    https://appleid.apple.com/
    Click "Manage My Account", sign in, and go to the Password and Security section. If you've forgotten your answers, there should be a link just under the security questions fields where you can have a reset email sent to your Rescue email address. If the link for the email doesn't appear, as can happen if you didn't set a rescue email address or (apparently) have a .Mac email address, see the user tip created by Kappy, another user here, on how to proceed:
    https://discussions.apple.com/docs/DOC-4551
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base, before you post a question.

  • [Solved] Change shell in script and keep child processes in new shell?

    Hi all,
    I have been trying to replicate the following in a script:
    # optirun bash
    # wine steam
    I have tried using
    optirun bash -c "command"
    but apparently wine spawns programs as a child process and then terminates which exits the bash shell with optirun on it.  Is there a way to keep the child processes inside the same shell too?
    Thanks!
    Last edited by b4bblefish (2013-03-04 00:50:45)

    Don't think so.  I have tried the nvidia fix for it, but it doesn't work, but that might be because i'm using the bumblebee-nvidia package
    https://wiki.archlinux.org/index.php/Bu … display_:8
    https://github.com/Bumblebee-Project/Bu … leshooting
    Last edited by b4bblefish (2013-03-03 20:19:08)

  • Runtime.exec child process - C program, I/O blocked???

    Hi i'm meeting this interesting problem. I am running a simple C app from a Java app as a child process. I want to read/write both the Input and Output before the child process is finished but especially the output of the C app seems to be bloked before the process is finsished and thus i can not make any dialogue with the app when needed?
    Any ideas...., here's the source
    try
    String[] command={"cmd","/c","prog.exe"};
                   Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(command);
    InputStream stderr = proc.getInputStream();
    /*String str="123";
    BufferedOutputStream bufStr= (BufferedOutputStream) proc.getOutputStream();
    bufStr.write(123);
    bufStr.flush();*/
    InputStreamReader isr = new InputStreamReader(stderr);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while ( (line = br.readLine()) != null)
    System.out.println(line);
    PrintWriter out = new PrintWriter(new OutputStreamWriter(proc.getOutputStream()), true);
    out.write("qwer");
    out.flush();
    int exitVal = proc.waitFor();
    System.out.println("Process exitValue: " + exitVal);
    } catch (Throwable t)
    Another thing - when it reaches to reading the output of the C app , the execution of main is suspended and it hangs indefinitely....?
    thanks a lot , it really bugs me.....

    As for
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-
    traps.html?page=4 ,
    i have read it a couple of times and digested it:),
    tryed a couple of things but i can't say anything
    there solves my problem. If you have anything
    particular in your mind please, please specifuy or
    quote in the post....How can I ! You don't show your latest code and your original code needed changing so that it implemented the guidelines in the reference.
    >
    And one more thing , i am pretty sure that the
    problem is in the fact that the .exe prog blocks its
    out stream until finishing, i'm working on why and
    how to undo it....Since I don't have access to the source code of your exe and I don't have the source code of your java and I don't have your problem with executing any of my exe files then I can't comment. And, yes my exe files do write to stdin, read from stdout and read from stderr. I also use the same approach with perl and python scripts.

  • Coldfusion 10 Enterprise with Tomcat + mod_jk and Apache2 experiencing child process hangups

    I am experiencing the most bizarre thing that so far I am unable to reproduce with my own visits to the site.
    After restarting Apache2 my cacti graphs show that the child processes increment consistently over the course of a day without dropping back down during off hours.  This behavior eventually leaves the website inaccessible...
    Looking at server-status it is filled with Ws (Sending Reply) and GET calls to my cfm applications :
    Current Time: Tuesday, 22-Jul-2014 16:33:00 PDTRestart Time: Monday, 21-Jul-2014 22:51:12 PDTParent Server Generation: 0Server uptime: 17 hours 41 minutes 48 secondsTotal accesses: 194844 - Total Traffic: 3.8 GBCPU Usage: u201.55 s34.46 cu0 cs0 - .37% CPU load3.06 requests/sec - 63.2 kB/second - 20.6 kB/request73 requests currently being processed, 4 idle workers
    WWWWWWWWWWWWWWWWWWWWWWWWWKWWWWWWWWWWWWWWWWWCWWWWW_WWWWWWCWWW_WWW _WKW...KWW.W_KWW....W........................................... ................................................................ ................................................................
    Scoreboard Key:
    "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
    "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
    "C" Closing connection, "L" Logging, "G" Gracefully finishing,
    "I" Idle cleanup of worker, "." Open slot with no current process
    Srv
    PID
    Acc
    M
    CPU
    SS
    Req
    Conn
    Child
    Slot
    Client
    VHost
    Request
    0-0
    15074
    0/46/1370
    W
    7.39
    46158
    0
    0.0
    0.44
    23.89
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=7000 HTTP/1.1
    1-0
    11563
    0/47/468
    W
    2.75
    58867
    0
    0.0
    4.69
    13.64
    192.168.1.10
    www.mysite.edu
    GET /catalog/index.cfm?courselist=list&dept=&searchc=PEHW%20148
    2-0
    12906
    0/65/884
    W
    7.30
    54536
    0
    0.0
    0.80
    14.62
    192.168.1.10
    www.mysite.edu
    GET /athletics/resources/nwaacc-athlete-of-the-week/ HTTP/1.1
    3-0
    13840
    0/41/1085
    W
    4.01
    51162
    0
    0.0
    0.56
    20.57
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=17001 HTTP/1.1
    4-0
    15928
    0/20/1635
    W
    5.40
    43715
    0
    0.0
    0.06
    41.37
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=37000 HTTP/1.1
    5-0
    18774
    0/19/2387
    W
    0.33
    34564
    0
    0.0
    0.24
    52.70
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=19009 HTTP/1.1
    6-0
    4321
    0/36/6612
    W
    3.61
    13200
    0
    0.0
    0.28
    129.74
    192.168.1.10
    www.mysite.edu
    GET /directory/index.cfm?directory=department&deptexp=28011 HTT
    7-0
    13077
    0/0/808
    W
    0.42
    54383
    0
    0.0
    0.00
    24.81
    192.168.1.10
    www.mysite.edu
    GET /directory/index.cfm?directory=department&deptexp=6005 HTTP
    8-0
    16488
    0/118/1673
    W
    12.39
    40692
    0
    0.0
    1.30
    35.44
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=31003 HTTP/1.1
    9-0
    10726
    0/15/110
    W
    0.58
    61963
    0
    0.0
    0.05
    1.83
    192.168.1.10
    www.mysite.edu
    GET /directory/index.cfm?directory=All&index=Q HTTP/1.1
    10-0
    13154
    0/1/688
    W
    0.00
    54165
    0
    0.0
    0.00
    16.83
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=All&firstname=Patrick&lastname=Murphy
    11-0
    12590
    0/25/516
    W
    4.45
    55851
    0
    0.0
    0.76
    11.19
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=4000 HTTP/1.1
    12-0
    12551
    0/13/454
    W
    1.84
    56055
    0
    0.0
    0.38
    10.00
    192.168.1.10
    www.mysite.edu
    GET /directory/index.cfm?directory=department&deptexp=20001 HTT
    13-0
    13333
    0/23/626
    W
    3.86
    53189
    0
    0.0
    0.57
    11.66
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=31005 HTTP/1.1
    14-0
    12410
    0/13/387
    W
    2.70
    56484
    0
    0.0
    0.42
    10.55
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=6003 HTTP/1.1
    15-0
    13162
    0/70/389
    W
    10.81
    53114
    0
    0.0
    0.86
    5.60
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=6005 HTTP/1.1
    16-0
    12309
    0/22/275
    W
    2.23
    56878
    0
    0.0
    0.43
    3.91
    192.168.1.10
    www.mysite.edu
    GET /directory/?directory=department&deptexp=20005 HTTP/1.1
    17-0
    13163
    0/57/341
    W
    11.85
    53120
    0
    0.0
    1.38
    6.49
    192.168.1.10
    www.mysite.edu
    GET /catalog/index.cfm?courselist=list&dept=&searchc=ENGR%26%20
    I have straced a hung process to only find the following :
    strace -p 6472
    Process 6472 attached - interrupt to quit
    read(23,
    Another interesting bit of info, none of these GET requests make it into my access.log file which I find very peculiar as well.
    Here are my CF Specs
    Server Details
    Server Product ColdFusion
    Version 10,0,13,287689
    Tomcat Version 7.0.23.0
    Edition Enterprise 
    Serial Number
    Operating System UNIX 
    OS Version 3.2.0-65-generic 
    Update Level /opt/coldfusion10/cfusion/lib/updates/chf10000013.jar 
    Adobe Driver Version 4.1 (Build 0001) 
    JVM Details
    Java Version 1.6.0_29 
    Java Vendor Sun Microsystems Inc. 
    Here are my Apache2 Specs
    Server version: Apache/2.2.22 (Ubuntu)
    Server built:   Apr 17 2014 21:49:25
    Server's Module Magic Number: 20051115:30
    Server loaded:  APR 1.4.6, APR-Util 1.3.12
    Compiled using: APR 1.4.6, APR-Util 1.3.12
    Architecture:   64-bit
    Server MPM:     Prefork
      threaded:     no
        forked:     yes (variable process count)
    Server compiled with....
    -D APACHE_MPM_DIR="server/mpm/prefork"
    -D APR_HAS_SENDFILE
    -D APR_HAS_MMAP
    -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
    -D APR_USE_SYSVSEM_SERIALIZE
    -D APR_USE_PTHREAD_SERIALIZE
    -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
    -D APR_HAS_OTHER_CHILD
    -D AP_HAVE_RELIABLE_PIPED_LOGS
    -D DYNAMIC_MODULE_LIMIT=128
    -D HTTPD_ROOT="/etc/apache2"
    -D SUEXEC_BIN="/usr/lib/apache2/suexec"
    -D DEFAULT_PIDLOG="/var/run/apache2.pid"
    -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
    -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
    -D DEFAULT_ERRORLOG="logs/error_log"
    -D AP_TYPES_CONFIG_FILE="mime.types"
    -D SERVER_CONFIG_FILE="apache2.conf"
    I am hoping this is no normal behavior for Coldfusion 10.
    Many thanks in advance.

    We're having the same problem, although with CF11.

  • Signal for non-child process death

    I am porting an NT system to Solaris. One process (HM) is responsible for starting groups of server processes, monitoring for death of a process, stopping/restarting/recovering the group. I know how to port this using fork/exec to start processes and SIGCHLD to monitor for death of child.
    Now, for the hard part. If this HM process dies and is restarted by the OS, it reads a text file containing all the child processes and resumes monitoring them. This is done under Win32 API because we do a WaitForMultipleObjects() call and pass the process handles.
    How can a unix process monitor for the death of non-child processes (because after HM dies and is restarted the processes that it needs to monitor are not its children anymore)?
    Can a unix process "adopt" processes from init (which would be the parent of the children after HM died)?
    I thank you in advance for your kind consideration of my questions.

    You cannot rely on /proc - it's not standardized
    (yet?) across different UNIX'es.Any information on how to find out if and/or when it will be standardized?
    And there is no 'watchdogs' that would allow you to
    simply get a notification when specific /proc/<pid>
    directory vanishes - unless you want to poll it...
    Finally, you cannot write/create arbitrary stuff in
    /proc - it's not a real file system, just a [mostly]
    read-only interface to the OS guts...I was not planning on writing to it or making up arbitrary files. I was considering opening the /prod/<pid>/as file (the /proc man page says that it contains information about the address space of the process). I would open it read-only and pass the file descriptor to a select() call in the exceptfds array. I think that this will return as an exception when the process dies, because the file goes away.
    So I'd simply use pipes in, say, /var/tmp, or even
    /tmp...My issue with using pipes is that some of the processes that I want to monitor are third-party processes that are crucial to our software's proper operation (like the processes that make up the CORBA ORB). I do not have the source code and cannot make them open up a pipe. So, I am forced to rely on what the operating system will do for me.
    Please reply with any flaws in my thinking, any improvements on my idea, etc.
    Thanks,
    Raymond Hendrey

  • Server spawning child processes

    Has anyone ever seen the WL server process spawn child processes? Does
    anyone know what it is doing when this happens and why it does so?
    Any help or insight is appreciated.
    Thanks,
    Raymond Lavoie
    P.S.
    Here is the environment:
    WL 4.5.1
    Solaris 2.6
    JDK 1.2.1_03
    using Native I/O

    Will garbase collection clean these up?
    Out heap has slowly risen to 77% during the course of the day. Should this
    happen? Will it wait until a certain % of heap use before it runs a big
    garbage collection? I don't think we are trying to create any new
    processes.
    Thanks.
    Rob Woollen wrote in message <[email protected]>...
    Those are zombies. The kernel will keep process information arounduntil
    the parent process collects it.
    Does your code ever attempt to create new processes?
    -- Rob
    Rob Woollen
    Software Engineer
    BEA WebLogic
    [email protected]
    Raymond Lavoie wrote:
    Can you explain what is happening here with these processes running below
    (6203 is the originial weblogic process).
    web001 28294 6203 0 0:00 <defunct>
    web001 27842 6203 0 0:00 <defunct>
    web001 20125 6203 0 0:00 <defunct>
    web001 26663 6203 0 0:00 <defunct>
    web001 24262 6203 0 0:00 <defunct>
    web001 23073 6203 0 0:00 <defunct>
    web001 28293 6203 0 0:00 <defunct>
    web001 23739 6203 0 0:00 <defunct>
    web001 27718 6203 0 0:00 <defunct>
    web001 21998 6203 0 0:00 <defunct>
    web001 23276 6203 0 0:00 <defunct>
    web001 25729 6203 0 0:00 <defunct>
    web001 24547 6203 0 0:00 <defunct>
    web001 25085 6203 0 0:00 <defunct>
    web001 26779 6203 0 0:00 <defunct>
    web001 12823 6203 0 0:00 <defunct>
    web001 6203 6180 0 10:49:14 pts/3 179:11
    /wl_data_1/java1.2/bin/../bin/sparc/native_threads/java -ms256m -mx256m -Dwe
    blo
    web001 20411 6203 0 0:00 <defunct>
    web001 19491 6203 0 0:00 <defunct>
    web001 12643 6203 0 0:00 <defunct>
    web001 13558 6203 0 0:00 <defunct>
    web001 28584 6203 0 0:00 <defunct>
    web001 26548 6203 0 0:00 <defunct>
    web001 13730 6203 0 0:00 <defunct>
    web001 17209 6203 0 0:00 <defunct>
    web001 26780 6203 0 0:00 <defunct>
    web001 14659 6203 0 0:00 <defunct>
    web001 26722 6203 0 0:00 <defunct>
    web001 26161 6203 0 0:00 <defunct>
    web001 26188 6203 0 0:00 <defunct>
    web001 24546 6203 0 0:00 <defunct>
    web001 22078 6203 0 0:00 <defunct>
    web001 12528 6203 0 0:00 <defunct>
    web001 28007 6203 0 0:00 <defunct>
    web001 13101 6203 0 0:00 <defunct>
    web001 12185 6203 0 16:26:54 pts/3 0:00
    /wl_data_1/java1.2/bin/../bin/sparc/native_threads/java -ms256m -mx256m -Dwe
    blo
    Don Ferguson wrote in message <[email protected]>...
    Well, I suppose processes are forked when compiling JSPs.
    Rob Woollen wrote:
    The WL server never forks another process. It does however use
    multiple threads.
    -- Rob
    Rob Woollen
    Software Engineer
    BEA WebLogic
    [email protected]
    Raymond Lavoie wrote:
    Has anyone ever seen the WL server process spawn child processes?
    Does
    anyone know what it is doing when this happens and why it does so?
    Any help or insight is appreciated.
    Thanks,
    Raymond Lavoie
    P.S.
    Here is the environment:
    WL 4.5.1
    Solaris 2.6
    JDK 1.2.1_03
    using Native I/O

  • "No Child Processes" - unable to install programs

    Hi All
    For some funny reason, I can no longer install any new programs. No new updates installed, nothing really has changed.
    I tried to install Google Chrome and after loading the .dmg file all I got was a message "No child processes". So I assumed Chrome had a bug. Then I tried to install Google Earth, same problem. So I assumed it was a Google bug.
    However I tried to install Firefox and the same thing has happened. Can't seem to find any solution on here or on the web... any ideas?
    Thanks (and Happy New Year!)

    Sounds like some process(s) are consuming all the available process slots.
    One common way for this to happen is trying to run everything at once and not quiting apps that are no longer in use.
    Another way is a poorly written process that constantly forks child processes, but never issues the wait() call to collect their completion status. As a result these child processes continue to exist as zombies until either the parent process issues a wait() system call, or the parent process dies.
    You might want to look at Applications -> Utilities -> Activity Monitor and see if anything looks strange.

  • JVM spawning mysterious child process of itself using Runtime.exec()

    Hello, I'm not sure if this is how this is supposed to work but I have a java application that monitors legacy c programs and after a period of time (its intermittent), I'll see a duplicate jvm process running the same classpath, classname as a child of the java application monitor. This behaviour can be reproduced with the following simple class running on either solaris 9 or 10 using 1.6.0_03-b05:
    public class Monitor {
    Process procss;
    public Monitor() {
    try {
    Runtime runtime = Runtime.getRuntime();
    for (int i = 0; i < 10000; i++) {
    System.out.println("execing command ls -l.");
    procss = runtime.exec("ls -l");
    procss.waitFor();
    catch (Exception e) {
    e.printStackTrace();
    public static void main(String[] args) {
    new Monitor();
    Using java -classpath ./ Monitor to run it. While this is running, at intermittent times doing a ps -ef you will see a duplicate jvm running whose parent process is the one that was started on the command line. Ie:
    UID PID PPID etc
    user 17434 10706 .... java -classpath ./ Monitor (the one I put running)
    user 27771 17434 .....java -classpath ./ Monitor (intermittently started)
    in another window I'll run the following shell script that will output the processes when a duplicate java process gets started as they don't seem to run very long (on my production system they will occasionally get hung up until I manually kill them):
    #!/usr/bin/ksh
    while ((1 == 1))
    do
    ps -ef | grep "Monitor" | grep -v grep > /tmp/test.out
    VAL=`cat /tmp/test.out | wc -l`
    if (($VAL != 1))
    then
    echo "Duplicate java process started"
    cat /tmp/test.out
    fi
    done
    It takes roughly 30 seconds before I start to see duplicate jvms starting to run. The concern is that is the new jvm instance running the Monitor class? Eventually on my production system the real application will have a child or 2 linger indefinetly, and threads will be deadlocked. Once I kill these child java processes, everything is back to normal. This doesn't seem to occur with the above java class but will show the duplicate child jvm's start to run after a bit.

    This is true for Solaris and Linux. Sun's implementation does a fork. A lot of people who have very large memory java applications wish there was a way to create a process from Java that doesn't involve copying the parent process. As far as I know your stuck.
    A workaround: Use jms, rmi, sockets, or files to communicate with a low memory footprint java application whose sole purpose is to spawn child processes.

Maybe you are looking for

  • Applying rules manually doesn't work for multiple messages

    I've been using Mail for some time now and love rules. Love 'em. A few months ago I started having touble and have not been able to figure it out. The rules get applied to new incoming messages properly, as they should. However, I used to be able to

  • Data base in microsoft office is damaged andI can't rebuild it. suggestions?

    Hi The data base for Microsoft Office 2008 has been damaged. I've tried twice to rebuild the data base, but it stalls after 2 hours and I'm forced to cancel. Very frustrating. The Office tools is a nice tool, but it's not working. I can use Word, Exc

  • How can i recover my pic From my old phone since this is my new phone

    HiHow can i recover my pic From my old phone since this is my new phone

  • Does iBooks Author support iPhone?

    I don't have an iPad and I would like to know if you can make a iBook for the iPhone with iBooks author. I don't see any way to have a preview with my iPhone 4 S. I find this strange because iPhone have iBook and I really like reading a book when I'm

  • How do I start up in safe mode

    I have a message saying I have no start up disk space and it won't let me gain access to all of my apps and programs.  How can I start my computer in safe mode so that it can run a disk utility, delete, or transfer files to an external hard drive?