This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
correct error returns from fast_abs_path()
[perl5.git] / amigaos4 / amigaio.h
CommitLineData
a83a2cd1
AB
1#ifndef _AMIGAIO_H
2#define _AMIGAIO_H
3
738ab09f 4#ifndef H_PERL
a83a2cd1 5#include "../perl.h"
738ab09f 6#endif
a83a2cd1
AB
7
8struct StdioStore
9{
6c47084d
JH
10 /* astdin...astderr are the amigaos file descriptors */
11 long astdin;
12 long astdout;
13 long astderr;
14 /* oldstdin...oldstderr are the amigados file handles */
15 long oldstdin;
16 long oldstdout;
17 long oldstderr;
a83a2cd1
AB
18};
19
20typedef struct StdioStore StdioStore;
21
22/* get the amigaos file descriptors */
23void amigaos_stdio_get(pTHX_ StdioStore *store);
24
25/* save the amigados file handles (calls amigaos_stdio_get) */
26void amigaos_stdio_save(pTHX_ StdioStore *store);
27
28/* restore the amigados file handles stored with amigaos_stdio_save */
29void amigaos_stdio_restore(pTHX_ const StdioStore *store);
30
31/* everything the child needs from the parent is in UserData,
32 * then pass it through task->tc_UserData or as arg to new pthread */
33struct UserData
34{
6c47084d
JH
35 struct Task *parent;
36 I32 did_pipes;
37 int pp;
38 SV **sp;
39 SV **mark;
40 PerlInterpreter *my_perl;
a83a2cd1
AB
41};
42
43void amigaos_fork_set_userdata(
44 pTHX_ struct UserData *userdata, I32 did_pipes, int pp, SV **sp, SV **mark);
45
46void *amigaos_system_child(void *userdata);
47
48void amigaos_post_exec(int fd, int do_report);
49
50Pid_t amigaos_fork();
51Pid_t amigaos_waitpid(pTHX_ int optype, Pid_t pid, void *argflags);
52
53#endif