Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
FA
Siril
Commits
5c8b3b7d
Commit
5c8b3b7d
authored
May 13, 2022
by
Vincent Hourdin
Browse files
starting two scripts from @ in succession, fixed
#796
parent
da080c48
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/core/command_line_processor.c
View file @
5c8b3b7d
...
...
@@ -189,6 +189,7 @@ gpointer execute_script(gpointer p) {
com
.
script
=
TRUE
;
com
.
stop_script
=
FALSE
;
com
.
script_thread_exited
=
FALSE
;
gettimeofday
(
&
t_start
,
NULL
);
...
...
@@ -276,8 +277,10 @@ gpointer execute_script(gpointer p) {
}
g_free
(
saved_cwd
);
if
(
com
.
script_thread
)
if
(
com
.
script_thread
)
{
siril_debug_print
(
"Script thread exiting
\n
"
);
com
.
script_thread_exited
=
TRUE
;
}
return
GINT_TO_POINTER
(
retval
);
}
...
...
@@ -417,10 +420,12 @@ int processcommand(const char *line) {
if
(
line
[
0
]
==
'\0'
||
line
[
0
]
==
'\n'
)
return
0
;
if
(
line
[
0
]
==
'@'
)
{
// case of files
if
(
get_thread_run
()
||
get_script_thread_run
())
{
if
(
get_thread_run
()
||
(
get_script_thread_run
()
&&
!
com
.
script_thread_exited
)
)
{
PRINT_ANOTHER_THREAD_RUNNING
;
return
1
;
}
if
(
get_script_thread_run
())
wait_for_script_thread
();
/* Switch to console tab */
control_window_switch_to_tab
(
OUTPUT_LOGS
);
...
...
src/core/processing.h
View file @
5c8b3b7d
...
...
@@ -125,6 +125,7 @@ gboolean reserve_thread();
void
unreserve_thread
();
gboolean
get_script_thread_run
();
void
wait_for_script_thread
();
gboolean
end_generic
(
gpointer
arg
);
guint
siril_add_idle
(
GSourceFunc
idle_function
,
gpointer
data
);
...
...
src/core/siril.h
View file @
5c8b3b7d
...
...
@@ -720,6 +720,7 @@ struct cominf {
gboolean
script
;
// scripts execution
gboolean
stop_script
;
// abort script execution
GThread
*
script_thread
;
// reads a script and executes its commands
gboolean
script_thread_exited
;
// boolean set by the script thread when it exits
rectangle
selection
;
// coordinates of the selection rectangle
};
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment