Welcome! Log In Create A New Profile

Advanced

How to implement pipe using libogc

Posted by PirxThePilot 
How to implement pipe using libogc
February 17, 2012 11:33AM
Hello Wii Hackers,

I have old Wii (Sport) with "Wii Menu" 3.3 and "Homebrew Channel" installed. I am new to Wii programming and haven't large experience in C/C++ programming (I know the basis). Yesterday devkitPro PPC has been downloaded and installed by me (Win32). Compiling included samples and running them on my Wii has been successful. Some homebrew apps was also downloaded and compiled by me succesfully.
I experienced difficulty with compiling "WiiShell" developed by Aksommerville. I hope that after some time I be able to compile this application.
My question is how to implement "|" - pipe using Libogc. Could somebody give me a hint how to achive that on Wii. My idea is to redirect stdin and stout and invoke "fork" and "exec" for new process. This would be very usefull for adding pipes support and grep command to WiiShell developed by Aksommerville (he attached sources to this appliction). Maybe my understanding how to accomplish such task is wrong?
I will appreciate any help :D

Regards,
Pirx
Re: How to implement pipe using libogc
February 17, 2012 11:37AM
Sorry I don't remember to write that inter process comunication is probably declared in:
libogc/include/ogc/ipc.h file (sygnatures), but I dont know how to use it?

Thanks in advance,
Pirx
Re: How to implement pipe using libogc
February 17, 2012 03:40PM
That file declares functions for communication with IOS only.
libogc doesn't support multiple processes so you won't be able to use it for what you want to do.
Re: How to implement pipe using libogc
February 17, 2012 04:49PM
Thank you very much. I think that I can redirect output for one command (etc. cat) to array of char array - char** outBuffer, end get input for grep from this array (but it is rather not good solution ;) )

Kind Regards,
Pirx
Re: How to implement pipe using libogc
February 17, 2012 04:56PM
Hello there again,

This is my last question concerning this topic - "Does IOS support many processes and "fork"" ?

I am asking because at URL (IOS syscalls):

IOS syscalls

I found that:

4| int get_pid(void) | Get the current process's ID | Current processid

this is one of system calls - what might suggest that IOS supports many processes ?

Thanks in advance,
Pirx



Edited 1 time(s). Last edit at 02/17/2012 06:25PM by PirxThePilot.
Re: How to implement pipe using libogc
February 17, 2012 10:41PM
IOS runs on a different CPU and controls access to I/O devices, it can't do what you want.
Re: How to implement pipe using libogc
February 18, 2012 09:05AM
Thanks again and sorry for messing with this topic ;)

Regards,
Pirx
Sorry, only registered users may post in this forum.

Click here to login