Click here to Skip to main content
15,902,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to get "native window" ? Pin
jschell13-Feb-24 4:45
jschell13-Feb-24 4:45 
GeneralMessage Closed Pin
14-Feb-24 4:12
Salvatore Terress14-Feb-24 4:12 
GeneralRe: how to get "native window" ? Pin
Richard MacCutchan14-Feb-24 4:23
mveRichard MacCutchan14-Feb-24 4:23 
GeneralRe: how to get "native window" ? Pin
Dave Kreskowiak14-Feb-24 4:37
mveDave Kreskowiak14-Feb-24 4:37 
GeneralMessage Closed Pin
14-Feb-24 6:31
Salvatore Terress14-Feb-24 6:31 
QuestionMessage Closed Pin
14-Feb-24 12:06
Salvatore Terress14-Feb-24 12:06 
AnswerRe: How to implement sudo -S and -ps options Pin
k505414-Feb-24 12:57
mvek505414-Feb-24 12:57 
GeneralMessage Closed Pin
15-Feb-24 11:17
Salvatore Terress15-Feb-24 11:17 
GeneralRe: How to implement sudo -S and -ps options Pin
Richard MacCutchan15-Feb-24 21:02
mveRichard MacCutchan15-Feb-24 21:02 
GeneralRe: How to implement sudo -S and -ps options Pin
jschell15-Feb-24 11:41
jschell15-Feb-24 11:41 
AnswerRe: How to implement sudo -S and -ps options Pin
Richard MacCutchan14-Feb-24 21:46
mveRichard MacCutchan14-Feb-24 21:46 
Questionpurpose of parameter value of -1 ? Pin
Salvatore Terress10-Feb-24 5:14
Salvatore Terress10-Feb-24 5:14 
AnswerRe: purpose of parameter value of -1 ? Pin
k505410-Feb-24 5:21
mvek505410-Feb-24 5:21 
AnswerRe: purpose of parameter value of -1 ? PinPopular
Mircea Neacsu10-Feb-24 5:24
Mircea Neacsu10-Feb-24 5:24 
GeneralRe: purpose of parameter value of -1 ? Pin
Salvatore Terress10-Feb-24 6:14
Salvatore Terress10-Feb-24 6:14 
GeneralRe: purpose of parameter value of -1 ? Pin
Richard MacCutchan10-Feb-24 21:23
mveRichard MacCutchan10-Feb-24 21:23 
AnswerRe: purpose of parameter value of -1 ? Pin
CPallini10-Feb-24 22:32
mveCPallini10-Feb-24 22:32 
GeneralRe: purpose of parameter value of -1 ? Pin
Richard MacCutchan11-Feb-24 2:19
mveRichard MacCutchan11-Feb-24 2:19 
GeneralRe: purpose of parameter value of -1 ? Pin
CPallini11-Feb-24 4:12
mveCPallini11-Feb-24 4:12 
QuestionUsing /bin/sh "partially " works Pin
Salvatore Terress9-Feb-24 6:10
Salvatore Terress9-Feb-24 6:10 
OK, another inherited code and I am not sure how it works...

I am using this to process "system commands" - Linux.

It works as expected with
command = "hcitool dev"
now I need to use
"sudo hcitool info (address) "
and it fails
it also fails with just
"sudo"

The failing code is this :



C++
                  if(QP->waitForReadyRead() | QP->waitForFinished())
                    {
#ifdef TASK_PROCESS_COMMAND
                        text = "SUCCESS  waitForReadyRead ";
                        text += " real time ";
                        text += " elapsed time ";
                        text += QString::number(QET->elapsed());
                        text += "  mS ";
                        qDebug() << text;
#endif
                    }
                    else
                    {
                        text = "FAILED  waitForReadyRead ";
                        text += " real time ";
                        text += " elapsed time ";
                        text += QString::number(QET->elapsed());
                        text += "  mS ";
                        qDebug() << text;
                    }


Here is my passed to /bin/sh code

C++
QP->start("/bin/sh", QStringList() << "-c" << command);


The way I interpret the error

there is no response to "sudo"
and I do not understand why.
AnswerRe: Using /bin/sh "partially " works Pin
Mircea Neacsu9-Feb-24 6:47
Mircea Neacsu9-Feb-24 6:47 
AnswerRe: Using /bin/sh "partially " works Pin
k50549-Feb-24 6:59
mvek50549-Feb-24 6:59 
AnswerRe: Using /bin/sh "partially " works Pin
jschell9-Feb-24 12:29
jschell9-Feb-24 12:29 
QuestionConcurrent linked list Pin
cod3Ninj47-Feb-24 23:40
cod3Ninj47-Feb-24 23:40 
AnswerRe: Concurrent linked list Pin
jschell9-Feb-24 12:32
jschell9-Feb-24 12:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.