On Thu May 24 23:03:19 EDT 2012, burton.samog...@gmail.com wrote: > I'm trying to add a restart feature to my modified rio by calling exec on a > saved argv[0] and copy of argv that has been null terminated, but it crashes > every time. Is there something about exec on plan9 that I should be aware > of that's different than unix?
no, there's not. however, rio is a thread-library program and you can't just exec() out without confusing other processes you're sharing memory with. rio already has a hook where it will provide an Exit menu option if ".out" appears somewhere in argv[0]. so, you could have an rc script named rio, and rename rio to rio.out. the rc script would just need to read something like #!/bin/rc while() rio.out $* - erik