V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
jasontse
V2EX  ›  Linux

linux如何等待一个非子进程退出?

  •  
  •   jasontse · Jun 26, 2013 via iPad · 4265 views
    This topic created in 4698 days ago, the information mentioned may be changed or developed.
    循环kill 0这种不停探测进程是不是存在的方法感觉很蠢,有没有更优雅的方法?就像WaitForSingleObject一样。
    3 replies    1970-01-01 08:00:00 +08:00
    zeiyso
        1
    zeiyso  
       Jun 27, 2013
    twitter @nialv7 的回复: 扔到cgroup里,用cgroup的free handler.
    rorvn
        2
    rorvn  
       Jun 27, 2013   ❤️ 1
    或者用netlink监听进程事件
    rorvn
        3
    rorvn  
       Jun 27, 2013
    cgroup的handler具体说是cgroup文件夹下的release_agent
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4113 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 00:53 · PVG 08:53 · LAX 17:53 · JFK 20:53
    ♥ Do have faith in what you're doing.