- scm_write (scm_from_locale_string (line), send_channel);
- scm_force_output (send_channel);
-
- while (scm_char_ready_p (rec_channel) == SCM_BOOL_F) {
- if (ctrl_c) break;
- sleep (0.5);
- }
- if (ctrl_c)
- ctrl_c = 0;
- else {
- buffer = scm_read (rec_channel);
- if (strlen (scm_to_locale_string (buffer)) > 0)
- printf ("%s\n", scm_to_locale_string (buffer));
+ if (opened == 0) {
+ scm_write (scm_from_locale_string (line), send_channel);
+ scm_force_output (send_channel);
+
+ while (scm_char_ready_p (rec_channel) == SCM_BOOL_F) {
+ if (ctrl_c) break;
+ sleep (0.5);
+ }
+ if (ctrl_c)
+ ctrl_c = 0;
+ else {
+ buffer = scm_read (rec_channel);
+ if (strlen (scm_to_locale_string (buffer)) > 0)
+ printf ("%s\n", scm_to_locale_string (buffer));
+ }