Skip to content

Commit

Permalink
No-op restart since it's not working and I don't know why.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiw committed Sep 11, 2024
1 parent bcf2673 commit f7c76b8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion radae_demo_rx.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

RADAE_PATH=$1
RADAE_VENV=$2
Expand Down
2 changes: 1 addition & 1 deletion radae_demo_tx.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

RADAE_PATH=$1
RADAE_VENV=$2
Expand Down
19 changes: 13 additions & 6 deletions src/pipeline/ExternVocoderStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,14 +530,15 @@ void ExternVocoderStep::openProcess_()
if (recvProcessId_ == 0)
{
// Child process, redirect stdin/stdout and execute receiver
rv = dup2(stdoutPipes[1], STDOUT_FILENO);
assert(rv != -1);
rv = dup2(stdinPipes[0], STDIN_FILENO);
assert(rv != -1);
close(stdinPipes[0]);

close(stdoutPipes[0]);
rv = dup2(stdoutPipes[1], STDOUT_FILENO);
assert(rv != -1);
close(stdoutPipes[1]);
close(stdinPipes[0]);

close(stdoutPipes[0]);
close(stdinPipes[1]);

// Tokenize and generate an argv for exec()
Expand Down Expand Up @@ -647,22 +648,28 @@ void ExternVocoderStep::threadEntry_()
fprintf(stderr, "[ExternVocoderStep] read() failed (errno %d)\n", errno);
break;
}
else
{
break;
}
}
}
else if (rv == -1)
{
fprintf(stderr, "[ExternVocoderStep] select() failed (errno %d, filenos %d / %d)\n", errno, receiveStdinFd_, receiveStdoutFd_);
break;
}


#if 0
if (isRestarting_)
{
// Close stdin and wait for process to die.
fprintf(stderr, "[ExternVocoerStep] Restarting...\n");
fprintf(stderr, "[ExternVocoderStep] Restarting...\n");
isRestarting_ = false;
close(receiveStdinFd_);
receiveStdinFd_ = -1;
}
#endif // 0
}

closeProcess_();
Expand Down

0 comments on commit f7c76b8

Please sign in to comment.