Sorry for my delayed response.  I missed your comments.  

If we modify safesystem to use open2, then $EDITOR can't get a tty, so it just hangs.  So, I just used system directly.  Checking $? is a good idea.