
11 Nov
2011
11 Nov
'11
12:16 p.m.
- There is a new function
System.Posix.ByteString.getArgs :: [ByteString]
returning the raw untranslated arguments as passed to exec() when the program was started.
Is this one similar to the [String] getArgs in that it drops unix's argv[0]? I was recently surprised by that in the standard getArgs because I wanted a program to restart itself. I can't figure out how to do that without access to argv[0]. I suppose for consistency the ByteString version should have the same behaviour, so maybe this is just an opportunity to wonder why it does that in the first place.