Branch: Tag:

2020-01-26

2020-01-26 14:09:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Process: Mark some spawn-related functions as deprecated.

894:    return ret;   }    - Process spawn(string command, void|Stdio.Stream stdin, -  void|Stdio.Stream stdout, void|Stdio.Stream stderr, -  // These aren't used. Seems to be part of something unfinished. /mast + __deprecated__ Process spawn(string command, +  void|Stdio.Stream stdin, +  void|Stdio.Stream stdout, +  void|Stdio.Stream stderr, +  // These aren't used. +  // Seems to be part of something unfinished. /mast    //function|void cleanup, mixed ... args    )   //! Spawns a process that executes @[command] as a command shell
933:   #endif /* __NT__ */   }    + #pragma no_deprecation_warnings +    //! @decl string popen(string command)   //! Executes @[command] as a shell statement ("@expr{/bin/sh -c   //! @[command]@}" for Unix, "@expr{cmd /c @[command]@}" for Windows),
958:   //! @seealso   //! @[system], @[spawn]    - variant string popen(string s) { + variant __deprecated__ string popen(string s) {    return fpopen(s)->read();   }    - variant Stdio.FILE popen(string s, string mode) { + variant __deprecated__ Stdio.FILE popen(string s, string mode) {    return fpopen(s,mode);   }    - protected Stdio.FILE fpopen(string s, string|void mode) + protected __deprecated__ Stdio.FILE fpopen(string s, string|void mode)   {    Stdio.FILE f = Stdio.FILE();    if (!f) error("Popen failed. (couldn't create file)\n");
984:    return f;   }    - int system(string command, void|Stdio.Stream stdin, + __deprecated__ int system(string command, void|Stdio.Stream stdin,    void|Stdio.Stream stdout, void|Stdio.Stream stderr)   //! Executes @[command] as a shell statement ("@expr{/bin/sh -c   //! @[command]@}" for Unix, "@expr{cmd /c @[command]@}" for Windows),
1004:    return spawn(command, stdin, stdout, stderr)->wait();   }    + #pragma deprecation_warnings +    #ifndef __NT__   #if constant(fork)   constant fork = predef::fork;