2013/1/14 JonY <[email protected]>

> On 1/14/2013 22:49, Ruben Van Boxem wrote:
> > That is of course a difficult one. Either internal bookkeeping or a
> simple
> > (?) translation function *where need be* (the hardest part being the
> latter
> > of course). MSYS achieves this somehow, so I'd start there.
> >
> >
>
> MSYS is pretty bad at path translation, it was what drove me to Cygwin
> in the first place. Perhaps some setting on how aggressive it scans and
> assumes a string as a path is a good idea.
>
> gcc -c abc.c -Dfoo="/bar1/bar2" <- is this a path to translate or just
> some string?
>
> Unfortunately, it is impossible to tell without peering into the actual
> code for context.
>

I assume Cygwin keeps track of an internal filesystem? I know that's how it
does symlinks; they are useless files outside the Cygwin environment.

>
> >>
> >>> If you could give me a real-world (albeit simple) example of some sh
> >>> trickery that is impossible to implement (without e.g. the fully
> spec'ed
> >>> functionality of fork()), I would love to know so I can dump this crazy
> >>> idea in the trash can before I spend any lost time in it.
> >>
> >> Sh itself doesn't actually need full spec fork, since it has no concept
> >> of memory addresses. The hard part is the other Unix apps that already
> >> use fork calls in C.
> >>
> >
> > That's good news, the C programs will need porting as I've said before in
> > sofar the ports don't already exist.
> >
> >
>
> Hopefully, you don't repeat the unmaintainable mess that is GnuWin32.
>

I've thought a lot about picking that up, right now I think implementing
them on top of Boost is the only feasible and realistic option. It carries
most (if not all) of the low level algorithms and code, time-tested and
efficient.


> >>
> >> Another hard part is the fork/exec pairs. As you run exec, the process
> >> is expected to still have the same pid. It is possible to have a process
> >> to dump it's pid before exec'ing something else. Not sure how to
> >> accomplish this in Windows without some external bookkeeping.
> >
> >
> > That sounds like something that falls under the scope of the sh
> > interpreter. I'm not sure how relevant this is when we have fully Win32
> > native Unix-like utilities though.
> >
>
> Well, there's that echo $$ > .pid && exec ... pair calls.
>

I'll see how I can handle those. Perhaps an internal pid bookkeeping might
be useful.

In the meantime, I've written the basic skeleton layout of a new Unix Tools
For Windows:
https://github.com/rubenvb/UnixToolsForWindows
(the readme with useful info is at the bottom)

People who want to help, please do :). Boost is the underlying framework to
be used. As I'm new to it (as a whole, some small parts I've used before)
myself, I'm going to start with "echo" and "date", which will give me a
little experience with program_options and date_time.

Note I am reinventing the wheel, but in a hopefully useful way.

Cheers,

Ruben


>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to