[BRLTTY] mingw built brltty can't find foreground if run as service

Sebok Máté msebok at aitia.ai
Tue Jul 9 12:23:10 EDT 2013


Ok, it seems I have found the issue: "Services cannot directly interact
with a user as of Windows Vista" and I have tried it on windows 7.
Trying it on win XP succeeded without any problem.

The freopen errors aren't closely related but can be easily cleaned (if it
hasn't been already been done in the latest rev):
in the Programs/config.c:

   #else /* redirect stdio streams to /dev/null */
+  #ifndef __MINGW32__
     {
       const char *nullDevice = "/dev/null";


         }
       }
+  #endif // __MINGW32__
   #endif /* redirect stdio streams to /dev/null */


Sorry for bothering you, but maybe it can help others.

Regards,
-Máté



On Tue, 09 Jul 2013 13:37:32 +0200, Sebok Máté <msebok at aitia.ai> wrote:
> Sorry, I have forgot to mention, in the syslog I got the following errors
> when starting as service:
> 
> "freopen[stdin] error 2: No such file or directory.
> 
> freopen[stdout] error 2: No such file or directory.
> 
> freopen[stderr] error 2: No such file or directory. "
> 
> but if runs as standalone application, these doesn't appears.
> 
> 
> -Máté
> 
> 
> On Tue, 09 Jul 2013 12:11:33 +0200, Sebok Máté <msebok at aitia.ai> wrote:
>> Hi,
>> 
>> I would like to test some driver communication with a serial/terminal
>> loopback device (hacked into the skeleton driver) but I have troubles
>> running it as a windows' service. In the output terminal it only prints:
>> "BRLTTY 4.4 rev 5477
>> no foreground window"
>> 
>> Interestingly enough, if I run the program regularly or by run-debug, it
>> works nicely.
>> 
>> For testing I have installed a windows binary setup and replaced the
> exe's
>> and the brlapi-0.5.dll in the BRLTTY\bin directory and altered the
>> etc\brltty.conf to use my driver.
>> 
>> Can you tell me, what have I missed?
>> 
>> Thanks!
>> 
>> -Máté
>> _______________________________________________
>> This message was sent via the BRLTTY mailing list.
>> To post a message, send an e-mail to: BRLTTY at mielke.cc
>> For general information, go to: http://mielke.cc/mailman/listinfo/brltty
>> 
> _______________________________________________
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY at mielke.cc
> For general information, go to: http://mielke.cc/mailman/listinfo/brltty
> 


More information about the BRLTTY mailing list