Summary: | Dangerous wait situation in ext-clock.c++ | ||
---|---|---|---|
Product: | BpmDj - old linux tools | Reporter: | Werner Van Belle <werner> |
Component: | selector | Assignee: | Bernard Fortz <bernard.fortz> |
Status: | NEW --- | ||
Severity: | major | ||
Priority: | Future | ||
Version: | 4.1 | ||
Hardware: | PC | ||
OS: | Linux |
Comment 2
Bernard Fortz
2009-11-10 20:45:19 CET
Actually this is not the only dangerous situation. If I understand it correct: you check whether there is a clockdriver and when there is none you start your own, however between checking and actually using it it could have dissapeared. Maybe it would be better not to use this pseudo intelligent 'create when necessary' approach. If bpmdj start it can spawn the external clock, which should then also not quit independently but wait until it receives the quit signal.) /* we need to wait for bpmclock to initialize the shared memory */ sleep(2); This is definitely a bad idea. IS there no other solution like waiting until a certain flag gets set in the shared memory or so ? |