Skip to main content
7 events
when toggle format what by license comment
Sep 28, 2020 at 10:20 vote accept Lucas
Sep 28, 2020 at 9:24 answer added Johan Myréen timeline score: 2
Sep 28, 2020 at 9:03 history edited Lucas CC BY-SA 4.0
update title now that the solution is clear
Sep 27, 2020 at 17:58 comment added Lucas @JohanMyréen yes I want to know to grandparent id. I am using this in a pager I am writing to detect if it is run from man or git: github.com/lucc/nvimpager/blob/… But for this I will soon change the name of the variable. It just did work on most systems up until now. But with this question I mainly just want to learn what is going on here. Why does it behave the way it does? Where are the relevant differences (because I did not see them).
Sep 27, 2020 at 14:30 comment added Johan Myréen What are you trying to achieve? I don't think it makes much sense to export PPID, since it is supposed to reflect the parent process id of the current shell, and this value changes for each shell. If you want the process id of a particular process, like the grandparent of the python process in your example, why don't you do what you suggested yourself: assign the value of PPID to PARENT_PROCESS and read that in your subprocess?
Sep 27, 2020 at 14:00 history edited Lucas CC BY-SA 4.0
Add version info as requested
Sep 27, 2020 at 9:25 history asked Lucas CC BY-SA 4.0