# Being in julia and killing julia in package manager (\]) stops not all subprocesses resulting in problems later

**URL:** <https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175>\
**Category:** General Usage\
**Created:** [May 9, 2020, 11:29am UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175 "2020-05-09T11:29:33Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [May 13, 2020, 9:24am UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/21 "2020-05-13T09:24:20Z")

</div>

As long as outline (vector) fonts are used - which are the default right now - the measured padding would be the same across all devices.

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [May 13, 2020, 1:23pm UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/22 "2020-05-13T13:23:34Z")

</div>

Perfect. I’ve made a PR here:

> <https://github.com/JuliaPlots/Plots.jl/pull/2699>

@DKad, could you check the PR out (`]add Plots#as/more_withenv`) and see if the orphan process still appears?

---

<div class="post-metadata">

**Author:** ![DKad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dkad/32/203663_2.png) [@DKad](https://discourse.julialang.org/u/DKad)\
**Post date:** [May 13, 2020, 1:42pm UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/23 "2020-05-13T13:42:08Z")

</div>

@asinghvi17 I’ve added Plots#as/more\_withenv, removed ENV[“GKSwstype”] = “100” in my startup.jl. Now the orphan process doesn’t appear.

---

<div class="post-metadata">

**Author:** ![DKad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dkad/32/203663_2.png) [@DKad](https://discourse.julialang.org/u/DKad)\
**Post date:** [May 13, 2020, 2:16pm UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/24 "2020-05-13T14:16:50Z")

</div>

@asinghvi17 I have a problem now, I cannot plot anymore:  
Simply  
using Plots  
plot(rand(10))  
has no effect, and then plot!() also has no effect. Even setting ENV[“GKSwstype”] = “100” in my startup.jl has no influence. Also  
using GR  
plot(rand(10))  
has no effect!

---

<div class="post-metadata">

**Author:** ![DKad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dkad/32/203663_2.png) [@DKad](https://discourse.julialang.org/u/DKad)\
**Post date:** [May 13, 2020, 3:15pm UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/25 "2020-05-13T15:15:32Z")

</div>

@asinghvi17 @jheinen I think the problem is not solved! With my system from yesterday I have similarly the problem that plot(random(10)) doesn’t work, if I have ENV[“GKSwstype”] = “100” in my startup.jl. I removed this and then plot() generates a plot, of course with the problem of an orphan process.

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [May 13, 2020, 3:34pm UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/26 "2020-05-13T15:34:11Z")

</div>

You cannot set `GKSwstype="100"` in `startup.jl`.

The `_update_min_padding` code has to be encapsulated in a `withenv` block, as suggested by @asinghvi17, and then, GR has to be closed (using `GR.emergencyclosegks()`) and the `GKSwstype` environment has to be reset to what it was before (or “0”). The latter would be the default.

I’ll check this tomorrow …

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [May 16, 2020, 5:03am UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/27 "2020-05-16T05:03:32Z")

</div>

@DKad: We were able to solve the problem in GR after all (see [this](https://github.com/sciapp/gr/commit/a88498a05f41fcf6c33334255cd709e369a90c83) commit). I assume that we will tag a new version next week.

Until then you should install to the latest run-time:

```julia
ENV["GRDIR"] = ""
] build GR

```

---

<div class="post-metadata">

**Author:** ![DKad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dkad/32/203663_2.png) [@DKad](https://discourse.julialang.org/u/DKad)\
**Post date:** [May 16, 2020, 10:47am UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/28 "2020-05-16T10:47:51Z")

</div>

Thank you, I don’t have an orphan process anymore. The (old) problem that

```julia
using GR
plot(rand(10)); savefig("Random.pdf")

```

shows the plot and

```julia
using Plots
plot(rand(10)); savefig("Random.pdf")

```

not is not solved for my system. Of course this is not critical.

---

<div class="post-metadata">

**Author:** ![DKad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dkad/32/203663_2.png) [@DKad](https://discourse.julialang.org/u/DKad)\
**Post date:** [May 25, 2020, 10:03am UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/29 "2020-05-25T10:03:04Z")

</div>

@jheinen: @asinghvi17: Hello, I just installed julia v. 1.4.2 **out of the box** with “julia-1.4.2-full.tar.gz” and with a new .julia local directory. I still have an orphane process

16931 pts/4 S 0:00 /home/ad08/.julia/packages/GR/cRdXQ/src/…/deps/gr/bin/gksqt

after running the simple code

> using Plots  
> plot(rand(10)); savefig(“Random.pdf”)

Only after applying your hint (for v.1.4.1)

```julia
ENV["GRDIR"] = ""
] build GR

```

this problem disappears. Note: I did not  
] add GR  
so that  
using GR  
resulted into an error. I don’t know what happens with  
]add GR, Plots  
with a fresh install.

---

<div class="post-metadata">

**Author:** ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)\
**Post date:** [May 25, 2020, 12:16pm UTC](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175/30 "2020-05-25T12:16:39Z")

</div>

The `gksqt` fix has been made in the developer version for `GR`, which is installed by setting the `GRDIR` environment. So the behaviour is as expected.

[Previous page](https://discourse.julialang.org/t/being-in-julia-and-killing-julia-in-package-manager-stops-not-all-subprocesses-resulting-in-problems-later/39175.md?page=1)
