Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
4fdc39dd
Commit
4fdc39dd
authored
Apr 08, 2002
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow panic_action to be configured through environment variable RSYNC_PANIC_ACTION.
parent
9a933bc2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
main.c
main.c
+14
-3
No files found.
main.c
View file @
4fdc39dd
...
...
@@ -816,13 +816,24 @@ static RETSIGTYPE sigchld_handler(int UNUSED(val)) {
* Solaris?) Can we be more portable?
**/
#ifdef MAINTAINER_MODE
const
char
*
get_panic_action
(
void
)
{
const
char
*
cmd_fmt
=
getenv
(
"RSYNC_PANIC_ACTION"
);
if
(
cmd_fmt
)
return
cmd_fmt
;
else
return
"xterm -display :0 -T Panic -n Panic "
"-e gdb /proc/%d/exe %d"
;
}
static
RETSIGTYPE
rsync_panic_handler
(
int
UNUSED
(
whatsig
))
{
char
cmd_buf
[
300
];
int
ret
;
sprintf
(
cmd_buf
,
"xterm -display :0 -T Panic -n Panic "
"-e gdb /proc/%d/exe %d"
,
sprintf
(
cmd_buf
,
get_panic_action
(),
getpid
(),
getpid
());
/* Unless we failed to execute gdb, we allow the process to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment