Hi, Just played with TProcess for the first time. I observed some oddities (?, or maybe I'm just dumb ...).
If you try to execute a process that is non-executable (like for example a word doc), then on Windows an exception is raised and GetLastOSError returns 193. If you try this on (my) linux, no exception is raised and a non-functional childprocess is forked (you can see it with ps ax). If you do this in a GTK 1 app, however, then the app gets killed. No errormessage, it just disappears. On the console you can se some errormessage: Xlib: unexpected async reply (sequence 0x4cf) In GTK 2 app, there is no crash. So 2 questions: 1. shouldn't trying to execute a non-executable file raise some kind of exception (like it does in Windows? 2. Why does the GTK 1 app crash? This might be a GTK bug and not fpc related. As a way to work arond this (and at least preventing the crash): is there a reliable way of cheking tha a file can be executed in the first place? I know I can check for the execute permission of the file in question, but that is not enough (on my system any file copied from my windows partition to linux will have the x permission set). Bart _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
