Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Redirecing virtual console output (devc-ditto): (3 Items)
   
Redirecing virtual console output (devc-ditto)  
I have a few  services (daemons) that I start in virtual console con3 using a script file. It looks as follows:

    reopen /dev/con3
    service_1
    service_2

The services use  the 'procmgr_daemon' function to start into the background and have the PROCMGR_DAEMON_NODEVNULL flag 
set. All output is shown when selecting the virtual console (con3). Now I would like to redirect the outputto a file 
instead. For some reason I can't get it working. I tried to use the devc-ditto utility also started from the script file
:

   devc-ditto /dev/con3 &
   reopen /dev/con3
   service 1
   service 2

from console-1   I  then try to read the output using as a test:
    cat /dev/con3.ditto &

Unfortunatly this does not show anything. However writing directly to con 3 using e.g.  'echo mary had a little... >/dev/con3' works and shows up in console-1. 

So the question is why he service output is not redirected to con1 and the output send directly to con3 using echo is. 

Does anyone have any idea?

Thanks Wim
Re: Redirecing virtual console output (devc-ditto)  
Try to put "sleep 1" between devc-ditto command and reopen in your script file

PKY

> I have a few  services (daemons) that I start in virtual console con3 using a 
> script file. It looks as follows:
> 
>     reopen /dev/con3
>     service_1
>     service_2
> 
> The services use  the 'procmgr_daemon' function to start into the background 
> and have the PROCMGR_DAEMON_NODEVNULL flag set. All output is shown when 
> selecting the virtual console (con3). Now I would like to redirect the 
> outputto a file instead. For some reason I can't get it working. I tried to 
> use the devc-ditto utility also started from the script file:
> 
>    devc-ditto /dev/con3 &
>    reopen /dev/con3
>    service 1
>    service 2
> 
> from console-1   I  then try to read the output using as a test:
>     cat /dev/con3.ditto &
> 
> Unfortunatly this does not show anything. However writing directly to con 3 
> using e.g.  'echo mary had a little... >/dev/con3' works and shows up in 
> console-1. 
> 
> So the question is why he service output is not redirected to con1 and the 
> output send directly to con3 using echo is. 
> 
> Does anyone have any idea?
> 
> Thanks Wim


Re: Redirecing virtual console output (devc-ditto)  
Thanks for the suggestion !  The behaviour is definitly changed -:). 

Now all service output is default send to console 1 which is the standard login terminal.  messages written  to /dev/
con3  using echo are  still duplicated by the dev-ditto appl and can be monitored using cat /dev/con3.ditto

Regards
Wim