[IPython-dev] Use bash traps to automatically remove ipcontroller/engine pid (or json) files

Alex Gaudio adgaudio@gmail....
Mon Mar 11 19:52:25 CDT 2013

Hello all,

I've been using bash traps to automatically remove pid (and json) files
when an ipcontroller crashes or is forcibly shutdown.  They've proven
extremely useful for me.  Do you think it's worth integrating this
functionality into IPython by default?  If so, any ideas how one could
integrate this?

A bash trap could look like this:

*    /bin/bash -c "trap 'rm {pid_fp} {json_fp} ' EXIT {ipcontroller_cmd}"

  pid_fp could be "~/.ipython/profile_default/pid/ipcontroller.pid"
  json_fp could be
  ipcontroller_cmd could be "ipcontroller"

** I find this is particularly useful in conjunction with the --cluster-id
option to manage continuous code deploys.

Thanks for your time!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130311/3c2a401f/attachment.html 

More information about the IPython-dev mailing list