Opened 15 years ago
Closed 15 years ago
#97 closed defect (fixed)
Tracer cannot cope with console inheritance
Reported by: | Jiri Svoboda | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.4.1 |
Component: | helenos/unspecified | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
Trunk r4642. With console inheritance in place the tracer tries to start up the binary which it is supposed to trace on the same VC as itself. The application does not seem to work (produces no output), possibly being blocked by the already connected tracer.
Tracer should either be made capable of sharing the console with the app or, more simply, start the app on a different VC.
Note:
See TracTickets
for help on using tickets.
There are two interesting issues here:
I worked around both issues. As for issue 1 I switched to reading key events (which goes directly to the console), thus printf() and console_get_event() use different phones and the problem goes away. As for issue 2 I created a dedicated fibril for reading console events that signals the global state CV. It is interesting to note that this fibril can never finish (it can only wait on one thing — console events) and so it relies on being cleaned up when the whole task terminates.
In any case the tracer now works as of r4656, even when the app runs at the same VC as the tracer. Also, the tracer will now exit as soon as the app does.