From: Michael R. <re...@eu...> - 2006-09-13 15:04:58
|
Hi Ernst, > Here a little patch that changes the argv[0] of threads started with > lcd4linux's thread.c to the thread name. Fine, good idea! Did you already commit? Did I give you CVS write access? > a few more patches to the thread functions will follow shortly, I'm > implementing some stuff for my "VFD4Linux" driver and will send patches for > the generic parts I need during the progress. Patches are always welcome! > info("thread %s starting...", name); > + if (thread_argc > 0) { > + strncpy(thread_argv[0],name,strlen(thread_argv[0])); > + } just curious: isn't there a problem if the new (thread) name is longer than the "original" name, so your strncpy would overwrite things that are better not overwritten? I thing I read something like this sometime somewhere..... bye, Michael -- Michael Reinelt <re...@eu...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |