Re: Detecting glibc getopt?
От | Peter Eisentraut |
---|---|
Тема | Re: Detecting glibc getopt? |
Дата | |
Msg-id | Pine.LNX.4.30.0110201136380.827-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Detecting glibc getopt? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Detecting glibc getopt?
|
Список | pgsql-hackers |
Tom Lane writes: > The reason we see this now, and didn't see it before, is that > I rearranged startup to set the ps process title as soon as possible > after forking a subprocess --- and at least on Linux machines, that > "nextchar" pointer is pointing into the argv array that's overwritten > by init_ps_display. How about copying the entire argv[] array to a new location before the very first call to getopt(). Then you can use getopt() without hackery and can do anything you want to the "real" argv area. That should be a lot safer. (We don't know yet what other platforms might play optimization tricks in getopt().) -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
В списке pgsql-hackers по дате отправления: