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]

Running non-cygwin executables in cygwin bash terminal or script


Hello,

In general, is there anything that can go wrong or not work if I
invoke regular Windows/.NET executables (not compiled with any cygwin
header or linked with any cygwin dll) from a cygwin bash terminal or
script?

I am planning to write a bash script to call rsync and then a command
line program written in C# (.NET framework 4.5 in Visual Studio 2013).

I'm not a huge cygwin/posix/unix hacker, so there are a few things
that seem murky. I suppose that are other people in similar
situations.

I can think of a few things that don't seem entirely clear in the
documentation and FAQ.

I'm guessing that invoking regular Windows/.NET executables would
mostly just work, with the following caveat:
- stdin/stdout/stderr redirection and piping would still work, even
when piping with cygwin-linked programs (care with charset and
end-of-line conventions needs to be taken, however);
- UNIX-style sockets are out of the question;
- the usual Window permission model would still be used;
- if the regular Windows/.NET executable accepts a file or directory
path as argument, it still needs to be written in the Windows style
(i.e. "C:\\foobar\\" instead of "/cygdrive/c/foobar");
- the locale of the cygwin bash process may cause problems when
passing arguments to the regular Windows program.

Am I mostly correct? So far it seems to work. Am I missing other caveat?

Would it make sense to have all this summarized in the FAQ?

Best Regards,
Kal

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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