2 * Copyright (C) 2012, The AROS Development Team. All rights reserved.
3 * Author: Jason S. McMullan <jason.mcmullan@gmail.com>
5 * Licensed under the AROS PUBLIC LICENSE (APL) Version 1.1
8 #include <proto/alib.h>
9 #include <proto/exec.h>
10 #include <proto/dos.h>
12 #include <aros/shcommands.h>
14 AROS_SH0(autopipe
, 1.0)
18 int err
= RETURN_FAIL
;
21 if ((fhw
= Open("PIPE:*", MODE_NEWFILE
))) {
24 if (NameFromFH(fhw
, name
, sizeof(name
)) != 0) {
27 Printf("PIPE:* => %s\n", name
);
28 if ((fhr
= Open(name
, MODE_OLDFILE
))) {
29 Write(fhw
, "Hello", 5);
33 Printf("Hello => %s\n", name
);
37 Printf("Can't get name, Error %d\n", IoErr());
41 Printf("Can't open PIPE:*\n");