[android-porting] Re: sensors.h file descripter help

2009-08-20 Thread Ke
Some code snippets, Seem to have trouble getting a valid fd the second time around. I suspect I am doing something wrong with dupping the fd or not using select properly in the data__poll function. Code: static int control__open_data_source(struct sensors_control_device_t *dev) { if

[android-porting] Re: sensors.h file descripter help

2009-08-20 Thread Ke
solved it.. apparently system_server was closing the master/original fd every time there is a request for the fd from a process which utilizes sensor manager. if (ctl-fd 0) { ctl-fd = open_sensors_phy(); } inside the static int control__open_data_source(struct sensors_control_device_t