[Lost] [Patch 2/3] Pascal-RTL: exec richtig implementieren
Antoine Kaufmann ·
Am Sonntag, 20. April 2008 15.01:23 schrieb mail at kevin-wolf.de: > ! Pascal-RTL: dos: exec wartet bis das gestartete Prorgramm beendet wird > > '+function c_waitpid(pid: dword; status: Pointer; flags: dword): dword; Hm muesste das nicht integer sein? > > function LastDelimiter(const Delimiters, S: string): Integer; > var > @@ -341,11 +342,17 @@ > procedure Exec(const path: PathStr; const args: ComStr); > var > cmdline: String; > + ret, pid: integer; > + status: integer; > begin > cmdline := path + ' ' + args + #0; > - c_init_execute(@cmdline[1]); > > - // FIXME while (get_parent_pid(pid) != 0) yield(); > + pid := c_init_execute(@cmdline[1]); > + ret := c_waitpid(pid, @status, 0); Hier gehst du ja auch von einem Integer aus. Aber sonst kannst du das einchecken.