[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] problemer med fork



Her er lidt psedukode, som jeg ville lave( har ikke kodet c i lang tid )
void do_something(){
   getSomeData();
    fork();
    if( child )
        processData()
    else
        do_something()
}

Lars Hansen
Lamer wrote:

> Hej
>
> Jeg har problemer med forkdelen i en proces. Jeg skal have lavet en fork,
> hvor børneprocessen skal behandle nogle data, mens faderprocessen skal hoppe
> ud (så at sige), og vente på at modtage nye data som skal behandles.
>
> Har brugt en switch/case men har problemer med at få faderen til at modtage
> nye data efter at have forket d.v.s. den kan kun køre én gang.
>
> syntaks for fader i switch/case :  default: return; eller default: break;
>
> Skal ikke breake......men return virker heller ikke.Sandsynligvis noget galt
> med syntaksen.Håber der er nogen, der kan komme med et godt råd.
>
> Lamer



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *