This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: lpr works? FAQ in error?


Mark J. Reed wrote on Wednesday, July 23, 2008 4:20 PM:
> On Wed, Jul 23, 2008 at 4:00 PM, Wilfried wrote:
>> But there is no need to put the sleep command in.
>> I had the impression that the script waited until the cygstart
>> command was finished.
> 
> Yes, but the cygstart command doesn't wait for the command it starts;
> it returns to the shell prompt immediately.  So the script might
> start Notepad and then delete the file before Notepad even has a
> chance to try to load it.   

Giving cygstart a ` --wait ' option might be useful for some situations.
(Just a thought -- NOT a request!)  But a simple

$ notepad /p "$(cygpath -w "$tmp_file")"

waits for notepad to exit before issuing a new prompt, so one does
not need to do

$ "$(cygpath -u "$COMSPEC")" /c start /wait notepad.exe /p "$(cygpath -w "$tmp_file")"

or even

$ cygstart --wait notepad /p "$(cygpath -w "$tmp_file")"

(theoretically possible in the future)

- Barry
  -  Disclaimer: Statements made herein are not made on behalf of NIAID.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]