Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
feh
Commits
3ca93e4f
Commit
3ca93e4f
authored
6 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Plain Diff
Merge branch 'giladogit-patch-1'
parents
946c837a
f428edbd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main.c
+6
-6
6 additions, 6 deletions
src/main.c
src/signals.c
+3
-1
3 additions, 1 deletion
src/signals.c
src/signals.h
+1
-1
1 addition, 1 deletion
src/signals.h
with
10 additions
and
8 deletions
src/main.c
+
6
−
6
View file @
3ca93e4f
...
...
@@ -87,7 +87,7 @@ int main(int argc, char **argv)
/* main event loop */
while
(
feh_main_iteration
(
1
));
return
(
0
);
return
(
sig_exit
);
}
/* Return 0 to stop iterating, 1 if ok to continue. */
...
...
@@ -104,7 +104,7 @@ int feh_main_iteration(int block)
double
t1
=
0
.
0
,
t2
=
0
.
0
;
fehtimer
ft
;
if
(
window_num
==
0
)
if
(
window_num
==
0
||
sig_exit
!=
0
)
return
(
0
);
if
(
first
)
{
...
...
@@ -137,7 +137,7 @@ int feh_main_iteration(int block)
if
(
ev_handler
[
ev
.
type
])
(
*
(
ev_handler
[
ev
.
type
]))
(
&
ev
);
if
(
window_num
==
0
)
if
(
window_num
==
0
||
sig_exit
!=
0
)
return
(
0
);
}
XFlush
(
disp
);
...
...
@@ -191,7 +191,7 @@ int feh_main_iteration(int block)
in that */
feh_handle_timer
();
}
else
if
(
count
&&
(
FD_ISSET
(
0
,
&
fdset
)))
else
if
(
(
count
>
0
)
&&
(
FD_ISSET
(
0
,
&
fdset
)))
feh_event_handle_stdin
();
}
}
else
{
...
...
@@ -204,11 +204,11 @@ int feh_main_iteration(int block)
&&
((
errno
==
ENOMEM
)
||
(
errno
==
EINVAL
)
||
(
errno
==
EBADF
)))
eprintf
(
"Connection to X display lost"
);
else
if
(
count
&&
(
FD_ISSET
(
0
,
&
fdset
)))
else
if
(
(
count
>
0
)
&&
(
FD_ISSET
(
0
,
&
fdset
)))
feh_event_handle_stdin
();
}
}
if
(
window_num
==
0
)
if
(
window_num
==
0
||
sig_exit
!=
0
)
return
(
0
);
return
(
1
);
...
...
This diff is collapsed.
Click to expand it.
src/signals.c
+
3
−
1
View file @
3ca93e4f
...
...
@@ -28,6 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include
"options.h"
void
feh_handle_signal
(
int
);
int
sig_exit
=
0
;
void
setup_signal_handlers
()
{
...
...
@@ -86,7 +87,8 @@ void feh_handle_signal(int signo)
case
SIGQUIT
:
if
(
childpid
)
killpg
(
childpid
,
SIGINT
);
exit
(
128
+
signo
);
sig_exit
=
128
+
signo
;
return
;
}
winwid
=
winwidget_get_first_window_of_type
(
WIN_TYPE_SLIDESHOW
);
...
...
This diff is collapsed.
Click to expand it.
src/signals.h
+
1
−
1
View file @
3ca93e4f
...
...
@@ -27,5 +27,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SIGNALS_H
void
setup_signal_handlers
();
extern
int
sig_exit
;
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment