解决方案 »

  1.   

    或者谁能告诉我tomcat是怎么实现ppid=1的吗?因为我写的程序有部分是tomcat中抄的 
    root      5704  1484  0 01:17 pts/1    00:00:00 /bin/sh ./server_start.sh -eq 1
    root      5715  5704 43 01:17 pts/1    00:00:02 
    我这里怎么会有两个进程??? 
      

  2.   

    这里ppid 是 5704 
    我是想把它PPID设置为1,5704的PPID是1484 那是个远程回话的PID 当远程会话中断后就木有了
      

  3.   

    使用top命令查看结果,pid 为1 的进程是linux启动的init进程号,这个不可修改  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+ COMMAND                                                                                                                                                                                    
        1 root      20   0 10376  832  696 S    0  0.0   1:28.63 init                                                                                                                  
        2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                                                                                                              
        3 root      RT   0     0    0    0 S    0  0.0   0:00.78 migration/0                                                                                                           
        4 root      20   0     0    0    0 S    0  0.0   0:21.16 ksoftirqd/0                                                                                                           
        5 root      RT   0     0    0    0 S    0  0.0   0:00.77 migration/1                                                                                                           
        6 root      20   0     0    0    0 S    0  0.0   0:19.70 ksoftirqd/1                                                                                                           
        7 root      RT   0     0    0    0 S    0  0.0   0:00.79 migration/2                                                                                                           
        8 root      20   0     0    0    0 S    0  0.0   0:17.24 ksoftirqd/2                                                                                                           
        9 root      RT   0     0    0    0 S    0  0.0   0:00.76 migration/3                                                                                                           
       10 root      20   0     0    0    0 S    0  0.0   0:26.28 ksoftirqd/3 
      

  4.   


    搞定了
    解决办法发出来吧
    多写个shell调用之前那个shell
    eval "container.sh" "$@" >/dev/null 2>&1 &
    感谢大家这么热情 到我1楼发的那个帖子也回复下吧 好给分