Comment

Comment by valarauca1

In Linux if I want to create a file I call

          err = open("/path/to/the/file/I/want/to/make", "rw");
In Windows if I want to create a file I call

          err = CreateFile(TEXT("input.txt"), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
:.:.:

In Linux if I want to fork a process to create a sub-process I call

        err = fork();
        err = exec(a.out);
        //now two instances of a.out are running!
In windows

        bRet = CreateProcess ("myapp.exe",NULL,NULL, NULL, FALSE, 0,NULL, NULL,&sui,&pi);
        //now one instance of my app is running...
In conclusion, no. Linx/Posix is far nicer then Windows/NT. There's a reason we've been using the same interfaces since 1973, they're very clean and very nice.
parent valarauca1 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton