summaryrefslogtreecommitdiff
path: root/amigaos4/amigaos.c
Commit message (Collapse)AuthorAgeFilesLines
* doc: fix some typoscuishuang2022-03-031-1/+1
| | | | | | Signed-off-by: cuishuang <imcusg@gmail.com> Committer: cuishuang is now a Perl author.
* amigaos4/amigaos.c: Use memzero, not memset(0)Karl Williamson2021-04-151-1/+1
|
* style: Detabify indentation of the C code maintained by the core.Michael G. Schwern2021-01-171-521/+521
| | | | | | | | | | | This just detabifies to get rid of the mixed tab/space indentation. Applying consistent indentation and dealing with other tabs are another issue. Done with `expand -i`. * vutil.* left alone, it's part of version. * Left regen managed files alone for now.
* amigaos4: avoid PerlIO_findFILE() in popen/plcoseAndy Broad2016-03-141-205/+3
| | | | | | | | | Merges amigaos_popen / amigaos_pclose with the amigaos specific version of the Perl_my_popen / Perl_my_pclose functions and uses PerlIO directly for the perl facing end of the PIPE:s thus avoid the issues of PerlIO_findFILE() completely. Also fixes a couple of warnings.
* amigaos4: better popen() + pclose() implementationAndy Broad2016-03-111-24/+67
| | | | | | | popen(): handle better the case where the popened external might exit before the child process manages to start. pclose(): protect with a semaphore.
* amigaos4: execvp() and popen() enhancementsAndy Broad2016-03-051-14/+50
| | | | | | | | | | | | | | | | | | myexecvp() Replaces alloca() in execvp() with IExec->AllocVecTags() with the memory type explicitly set to MEMF_SHARED (alloca allocating on the stack which is MEMF_PRIVATE and in theory at least you can't share that with the sub process (in practice this isn't enforced yet, too much old software would break, but one of these days)). amigaos_popen() Alters file opening order to ensure that the write end of the pipe is always opened first. Now attempts to pass Input() out Output() (stdin or stout) to the non-pipe file handles rather than NIL: reverting to NIL: if the above can't be DupFileHandled() (say if they were redirected to a file opened with an exclusive lock).
* amigaos4: clean up older style / deprecated AmigaOS callsAndy Broad2016-03-021-365/+50
|
* amigaos4: whitespace only, in amigaos4/Jarkko Hietaniemi2015-09-161-890/+901
| | | | | | | | Consistent formatting (and using "Andy Broad" style) for the amigaos4 code: astyle --style=bsd --indent=tab=4 amigaos4/*.[hc] (amigaos patch preparation script automates this)
* amigaos4: implement flock() emulationAndy Broad2015-09-161-0/+86
| | | | | Beware: not an exact implementation, the locks follow the OS level filehandle not the process.
* amigaos4: move the amigaos exec code under amigaos4Andy Broad2015-09-161-13/+37
| | | | | | | | | | | | | | | | | Largely reimplements 839a9f02, 54fa14d7, e8432c63, 40262ff4. The upside is that now doio.c and pp_sys.c have much less AmigaOS specific ifdefs. As a downside, the exec code is now forked (pun only partially accidental.) The earlier story regarding fork+exec, that the AmigaOS creating thread doesn't terminate but instead continues running is both true and false. The more detailed story is that the user-observable behaviour is as with POSIX/UNIX. The thread that created the new "task" (to use the AmigaOS terms) does hang around -- but all it does is to wait for the new task to terminate, and more importantly, it holds on to the resources like filehandles. If the task were to immediately terminate, the resources would be reclaimed by the kernel.
* amigaos4: add amigaos the glue codeAndy Broad2015-09-051-0/+1056
amigaos.c: pure amigaos code amigaio.c: bridge code between perl and amigaos