Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

^C do not kill all subprocess during a install #3373

Closed
FardaleM opened this issue May 24, 2018 · 4 comments
Closed

^C do not kill all subprocess during a install #3373

FardaleM opened this issue May 24, 2018 · 4 comments

Comments

@FardaleM
Copy link

During the compilation of dose3 I try to kill the compilation with a ^C. This return me to the shell but there is still some process running.
This is what is running after a ^C:

    1 root       20   0  219M  2980  2292 S  0.0  0.0  0:01.78 /sbin/init
24222 fardale    20   0  4396   760   692 S  0.0  0.0  0:00.00 ├─ /bin/sh -c touch deb/debian.mli  ; if  ocamlfind ocamlopt -pack -I d
24224 fardale    20   0 20092  4232  2972 S  0.0  0.1  0:00.00 │  └─ ocamlfind ocamlopt -pack -I deb deb/packages.cmx deb/apt.cmx deb/
24225 fardale    20   0 2662M 2505M  9088 R 99.2 31.4  0:16.57 │     └─ ocamlopt.opt -pack -I deb -o deb/debian.cmx deb/packages.cmx d

I have to send a SIGTERM to stop it.

opam config report:

# OPAM config report
# opam-version    1.2.2 
# self-upgrade    no
# os              linux
# external-solver aspcud $in $out $criteria
# criteria        -count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag)
# jobs            4
# repositories    1* (http)
# pinned          1 (version control)
# current-switch  4.06.1+flambda
# last-update     2018-05-24 10:00
@rjbou
Copy link
Collaborator

rjbou commented May 24, 2018

On Linux, opam relay the SIGINT to launched process. If these process don't react to SIGINT, they'll remain. Here some of the parents were killed by the SIGINT (ocamlbuild, etc.) but not ocamlopt childs.

@FardaleM
Copy link
Author

Oh I mixed SIGINT and SIGTERM. So this is more a issue of ocamlbuild that opam ?

@rjbou
Copy link
Collaborator

rjbou commented May 24, 2018

Yes, not really an opam issue.

Given this tree:

└─ make
  └─ ocamlbuild -j 10 -no-links -cflags -warn-error,FPSXY deb/debian.otarget
    └─ sh -c ~/.opam/4.06.1+flambda/.opam-switch/[..]/myocamlbuild -no-plugi
      └─ ~/.opam/4.06.1+flambda/.opam-switch/[..]/myocamlbuild -no-plugin -j
        └─ /bin/sh -c touch deb/debian.mli  ; if  ocamlfind ocamlopt -pack -
          └─ ocamlfind ocamlopt -pack -I deb deb/packages.cmx deb/apt.cmx de
            └─ ocamlopt.opt -pack -I deb -o deb/debian.cmx deb/packages.cmx 

ocamlbuild process can be SIGINT killed, but not the last three ocamlfind, ocamlopt (which are the three ones remaining after opam end).

@FardaleM
Copy link
Author

Ok thanks for the reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants