0

I would like to get the jobid from procfs in Linux. I see only Pid , Ppid in the /proc//status files. But I needed jobid too. Please let me know if there is a way to get the info.

Thanks !

Vin
  • 717
  • 1
  • 12
  • 26

1 Answers1

1

If you're referring to the job IDs in the shell, this information is known only to the shell that created the job. The kernel has no concept of 'job IDs' and therefore does not track them, or expose them via procfs (or any other method).

bdonlan
  • 224,562
  • 31
  • 268
  • 324
  • Thanks for the info. How do people get the jobid of a process to use in their code then ? There should be some way I suppose. – Vin Sep 19 '11 at 22:43
  • 2
    @Vin As a job id is only meaningful and accessible in shells, people only (rarly) use job id's in shell scripts, e.g. `%%` refers to the last executed background job. – nos Sep 19 '11 at 23:33